Products & Services Solutions Academia Support User Community Company

Learn more about Filter Design Toolbox   

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)
 
hd =
 
         FilterStructure: 'Direct-Form FIR'
              Arithmetic: 'double'
               Numerator: [1x31 double]
    PersistentMemory: 'on'
                  States: [30x1 double]

n=nstates(hd)

n =

    30


hm=mfilt.firfracdecim(2,3)
 
hm =
 
         FilterStructure: [1x46 char]
               Numerator: [1x72 double]
       RateChangeFactors: [2 3]
        PersistentMemory: false
                  States: [35x1 double]

n=nstates(hm)

n =

    35

See Also

mfilt

  


Free Early Verification Kit

Learn how to apply early verification to your development process through these technical resources.

How much time do you spend on testing to ensure implementation meets system-level requirements?

 © 1984-2009- The MathWorks, Inc.    -   Site Help   -   Patents   -   Trademarks   -   Privacy Policy   -   Preventing Piracy   -   RSS