Documentation

reset

Reset filter properties to initial conditions

Syntax

reset(hd)
reset(hm)

Description

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

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)

See Also

Was this topic helpful?