%% Reset a Dyadic Analysis Filter Bank
% 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).

X = [1 1 7 9 2 8 8 6]';
dydan = dsp.DyadicAnalysisFilterBank('NumLevels',1);

%
% Filter states are zero.

y = dydan(X);

%
% Invoke step method again without resetting states.

y1 = dydan(X);
isequal(y,y1)

%
% Reset the filter states.

reset(dydan); % Reset filter states to zero
y2 = dydan(X);
isequal(y,y2)

% Copyright 2012 The MathWorks, Inc.