Reset the internal states of a System object
reset(sysobj) resets the
internal states of System object™,
their initial values. The initial filter state values correspond to
the initial conditions for the difference equation defining the filter.
step method applies the filter to nonzero
input data, the states might be nonzero. Invoking the
again without first invoking the
reset method might
produce different outputs for an identical input. System objects with
no states are unaffected by
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 = 1×2 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.
reset(LPF) y3 = step(LPF,x); yes = all(y3==y1)
yes = 1×2 logical array 1 1