www.gusucode.com > dsp 案例源码程序 matlab代码 > dsp/ResetAHighpassFilterExample.m

    %% Reset a Highpass Filter
% Create a highpass filter with default properties.
%%

% Copyright 2015 The MathWorks, Inc.

HPF = dsp.HighpassFilter;

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

x = randn(10,2);

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

no = all(y2==y1)

%%
% The output is different because the internal states of |HPF| have
% changed. Reset the highpass filter and apply |step| again.
% Verify that the output is unchanged.

reset(HPF)

y3 = step(HPF,x);

yes = all(y3==y1)