Reset filter properties to initial conditions
reset(ha) resets all the properties of the adaptive filter ha that are updated when filtering to the value specified at construction. If you do not specify a value for any particular property when you construct an adaptive filter, the property value for that property is reset to the default value for the property.
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, the States property is reset to zero when hm is a decimator. Additionally, the filter internal properties are also reset to their factory values.
Denoise a sinusoid and reset the filter after filtering with it.
h = adaptfilt.lms(5,.05,1,[0.5,0.5,0.5,0.5,0.5]); n = filter(1,[1 1/2 1/3],.2*randn(1,2000)); d = sin((0:1999)*2*pi*0.005) + n; % Noisy sinusoid x = n; [y,e]= filter(h,x,d); % e has denoised signal disp(h) reset(h); % Reset the coefficients and states. disp(h)