Documentation

reset

Reset filter properties to initial conditions

Syntax

reset(ha)
reset(hd)
reset(hm)

Description

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(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, the 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, the States property is reset to zero when hm is a decimator. Additionally, the filter internal properties are also reset to their factory values.

Examples

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)

See Also

Was this topic helpful?