Main Content

filtstates.dfiir

IIR direct-form filter states

Syntax

Hs = filtstates.dfiir(numstates,denstates)

Description

Hs = filtstates.dfiir(numstates,denstates) returns an IIR direct-form filter states object Hs with two properties — Numerator and Denominator, which contain the filter states. These two properties are column vectors with each column representing a separate channel of filter states. The number of states is always one less than the number of filter numerator or denominator coefficients.

You can extract a filtstates object from the states property of an IIR direct-form I object with

Hd = dfilt.df1
Hs = Hd.states

Methods

You can use the following methods on a filtstates.dfiir object.

Method

Description

double

Converts a filtstates object to a double-precision vector containing the values of the numerator and denominator states. The numerator states are listed first in this vector, followed by the denominator states.

single

Converts a filtstates object to a single-precision vector containing the values of the numerator and denominator states. (This method is used with the DSP System Toolbox™ product.)

Examples

This example demonstrates the interaction of filtstates with a dfilt.df1 object.

[b,a] = butter(4,0.5);    % Design butterworth filter
Hd = dfilt.df1(b,a);      % Create dfilt object
Hs = Hd.states            % Extract filter states object
                          %  from dfilt states property
Hs.Numerator = [1,1,1,1]  % Modify numerator states
Hd.states = Hs            % Set modified states back to 
                          %  original object

Dbl = double(Hs)          % Create double vector from
                          %  states

Version History

Introduced before R2006a

See Also