nstates

Number of filter states

Syntax

n = nstates(hd)
n = nstates(hm)

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.

Multirate Filters

n = nstates(hm) returns the number of states n in the multirate filter hm. The number of states depends on the filter structure and the coefficients.

Examples

Check the number of states for two different filters, one a direct form FIR filter, the other a multirate filter.

h = firls(30,[0 .1 .2 .5]*2,[1 1 0 0]);
hd = dfilt.dffir(h);
NstateDF = nstates(hd);
hm = mfilt.firsrc(2,3);
NstateMR = nstates(hm);

See Also

Was this topic helpful?