Parks-McClellan optimal FIR filter order estimation

`[___] = firpmord(___,`

specifies a sampling frequency `fs`

)`fs`

. `fs`

defaults to
2 Hz, implying a Nyquist frequency of 1 Hz. You can specify band edges scaled to a
particular application's sample rate. You can use this with any of the previous input
syntaxes.

`firpmord`

uses the algorithm suggested in [1]. This function produces
inaccurate results for band edges close to either 0 or the Nyquist frequency,
`fs/2`

.

In some cases, `firpmord`

underestimates or overestimates the order
`n`

. If the filter does not meet the specifications, try a higher order
such as `n+1`

or `n+2`

.

[1] Rabiner, Lawrence R., and Otto
Herrmann. “The Predictability of Certain Optimum Finite-Impulse-Response Digital
Filters.” *IEEE ^{®} Transactions on Circuit Theory*. Vol. 20, Number 4,
1973, pp. 401–408.

[2] Rabiner, Lawrence R., and Bernard
Gold. *Theory and Application of Digital Signal Processing.* Englewood
Cliffs, NJ: Prentice-Hall, 1975, pp. 156–157.