| Products & Services | Solutions | Academia | Support | User Community | Company |
| Download Product Updates | | | Get Pricing | | | Trial Software |
| Documentation → Filter Design Toolbox |
| Contents | Index |
| Learn more about Filter Design Toolbox |
[lo,mo] = euclidfactors(hm)
[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.
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 =
3Indeed, (lo*L)-(mo*M) = (4*5)-(3*7) = -1.
![]() | ellip | equiripple | ![]() |

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 |