www.gusucode.com > dsp 案例源码程序 matlab代码 > dsp/ResetAnIIRHalfbandDecimatorExample.m
%% Reset an IIR Halfband Decimator % Create an IIR halfband decimator with default properties. %% % Copyright 2015 The MathWorks, Inc. IIRHalfbandDecim = dsp.IIRHalfbandDecimator; %% % Create a two-channel random signal. Apply the |step| method twice % on the signal. x = randn(10,2); y1 = step(IIRHalfbandDecim,x); y2 = step(IIRHalfbandDecim,x); no = all(y2==y1) %% % The output is different because the internal states of |IIRHalfbandDecim| % have changed. Use |reset| to reset the IIR halfband decimator and apply % |step| again. % Verify that the output is unchanged. reset(IIRHalfbandDecim) y3 = step(IIRHalfbandDecim,x); yes = all(y3==y1)