I want to design a FIR filter by using 'cfirpm' function , which can i use the group delay and grid frequency, my code is :
N=30 ; f=[linspace(-1,-.5,120),linspace(-0.4,0.7,60),linspace(0.8,1,90)]; d=[zeros(1,120),ones(1,60),zeros(1,90)].*exp(-j*pi*f*N-1/2); b=cfirpm(N,d,@lowpass); fvtool(b,1,'OverlayedAnalysis','phase');
But i got the following error in matlab,
Error using cfirpm Band edges must be monotonically increasing.
How can i solve this problem? or,how can i add the group delay in this function?
Thank you in advance.