Reset filter properties to initial conditions
reset(hd) resets all the
properties of the discrete-time filter
hd to their
factory values that are modified when you run the filter. In particular,
States property is reset to zero.
reset(hm) resets all the
properties of the multirate filter
hm to their
factory value that are modified when the filter is run. In particular,
States property is reset to zero when
a decimator. Additionally, the filter internal properties are also
reset to their factory values.
Filter a noisy sinusoid and then reset the filter.
[b,a] = butter(4,.5); h = dfilt.df2t(b,a); h.PersistentMemory = true; n = filter(1,[1 1/2 1/3],.2*randn(1,2000)); d = sin((0:1999)*2*pi*0.005) + n; % Noisy sinusoid y = filter(h,d); disp(h) reset(h); % Reset the coefficients and states. disp(h)