%% Reset Differentiator
% Create a differentiator with default properties.

DF = dsp.Differentiator;

%
% Create a two-channel random signal. Call the step method twice on the signal.

x = randn(10,2);

y1 = step(DF,x);
y2 = step(DF,x);

no = all(y2==y1)

%
% The output is different because the internal states of DF have changed. Use reset to reset the differentiator. Call step again, and verify that the output is unchanged.

reset(DF)

y3 = step(DF,x);

yes = all(y3==y1)

% Copyright 2012 The MathWorks, Inc.