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