Quantcast

Documentation Center

  • Trial Software
  • Product Updates

Contents

reset

System object: dsp.DigitalFilter
Package: dsp

Reset internal states of digital filter

Syntax

reset(H)

Description

reset(H) resets the filter states of the digital filter object,H, to their initial values of 0. The initial filter state values correspond to the initial conditions for the difference equation defining the filter. After the step method applies the digital filter object to nonzero input data, the states may be nonzero. Invoking the step method again without first invoking thereset method may produce different outputs for an identical input.

For example:

H = dsp.DigitalFilter;
H.TransferFunction = 'FIR (all zeros)';
H.Numerator = fir1(20,0.25);
n = 0:100;
x = cos(0.2*pi*n)+sin(0.8*pi*n);
y = step(H,x);
% Filter states are nonzero 
% Invoke step method again without resetting states
y1 = step(H,x);
isequal(y,y1) % returns 0
% Now reset filter states to 0
reset(H)
% Invoke step method 
y2 = step(H,x);
isequal(y,y2) % returns a 1
Was this topic helpful?