Main Content

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 the multirate filter mfilt.firsc. 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.

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

Version History

Introduced in R2011a

See Also