Products & Services Solutions Academia Support User Community Company

Learn more about Filter Design Toolbox   

euclidfactors - Euclid factors for multirate filter

Syntax

[lo,mo] = euclidfactors(hm)

Description

[lo,mo] = euclidfactors(hm) returns integer factors lo and mo such that (lo*L)-(mo*M) = -1. L and M are relatively prime and represent the interpolation and decimation factors of the multirate filter hm.

euclidfactors works with multirate filters that have both decimation and interpolation factors, such as mfilt.firfracdecim, mfilt.firfracinterp, or mfilt.firsrc. You cannot return lo and mo for decimators or interpolators.

Examples

Use an FIR fractional decimator, with L = 5 and M = 7, to show what euclidfactors does.

hm=mfilt.firfracdecim(5,7)
 
hm =
 
 FilterStructure: 'Direct-Form FIR Polyphase Fractional Decimator'
       Numerator: [1x168 double]
RateChangeFactors: [5 7]
 PersistentMemory: false
           States: [62x1 double]

[lo,mo]=euclidfactors(hm)

lo =

     4

mo =

     3

Indeed, (lo*L)-(mo*M) = (4*5)-(3*7) = -1.

See Also

polyphase, nstates

  


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