This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English version of the page.

Note: This page has been translated by MathWorks. Click here to see
To view all translated materials including this page, select Country from the country navigator on the bottom of this page.


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