Reset the internal states of a System object




reset(sysobj) resets the internal states of System object™, sysobj to their initial values. The initial filter state values correspond to the initial conditions for the difference equation defining the filter. After the step method applies the filter to nonzero input data, the states might be nonzero. Invoking the step method again without first invoking the reset method might produce different outputs for an identical input. System objects with no states are unaffected by reset.


collapse all

Create a lowpass filter with default properties.

LPF = dsp.LowpassFilter;

Create a two-channel random signal. Apply the step method twice on the signal.

x = randn(10,2);

y1 = step(LPF,x);
y2 = step(LPF,x);

no = all(y2==y1)
no = 1x2 logical array

   0   0

The output is different because the internal states of LPF have changed. Use reset to reset the lowpass filter and apply step again. Verify that the output is unchanged.


y3 = step(LPF,x);

yes = all(y3==y1)
yes = 1x2 logical array

   1   1

See Also

Introduced in R2011a