%% Reset the States of the Delay Object
% Note: This example runs only in R2016b or later. If you are using an earlier release, replace each call to the function with the equivalent step syntax. For example, myObject(x) becomes step(myObject,x).
% Delay input by 5 samples.

delay = dsp.Delay(5);
y = delay((1:10)')

%
% Delay the input without calling reset.

y1 = delay((1:10)')

%
% Reset states.

reset(delay);
y2 = delay((1:10)')

% Copyright 2012 The MathWorks, Inc.