How does FIrpm work?
firpm designs a linear-phase FIR filter using the Parks-McClellan algorithm [2]. The Parks-McClellan algorithm uses the Remez exchange algorithm and Chebyshev approximation theory to design filters with an optimal fit between the desired and actual frequency responses.
How to use Firpm in Matlab?
If you specify an odd-valued n , firpm increments it by 1. b = firpm(n,f,a,w) uses the weights in vector w to weight the fit in each frequency band. The length of w is half the length of f and a , so there is exactly one weight per band. b = firpm(n,f,a,w) is a synonym for b = firpm(n,f,@ firpmfrf ,a,w).