Main Content

nstates

Number of filter states

Syntax

n = nstates(hd)

Description

Discrete-Time Filters

n = nstates(hd) returns the number of states n in the discrete-time filter hd. The number of states depends on the filter structure and the coefficients.

Examples

collapse all

Determine the number of states of a direct form FIR filter.

FIRFilter = firls(30,[0 .1 .2 .5]*2,[1 1 0 0]);
DiscFilter = dfilt.dffir(FIRFilter);
NstateDF = nstates(DiscFilter)
NstateDF = 30

Version History

Introduced in R2011a