Optimal FIR Filter Design Procedure for the Parks–McClellan Algorithm
6 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
This code for calculating frequency/phase response works fs=8000;
f=[ 0 0.15 0.25 0.4 0.5 1]; % Edge frequencies
m=[ 0 0 1 1 0 0]; % Ideal magnitudes
w=[ 39 10 39 ]; % Error weight factors format long
b=remez(25,f,m,w) % (25+1) taps Parks-McClellan algorithm and Remez exchange
freqz(b,1,512,fs); % Plot the frequency response
axis([0 fs/2 -80 10])
But this doesn't work when i change the filter specification to:
fs=8000;
f=[ 0 0.01750 0.01875 0.06750 0.06755 0.1250]; % Edge frequencies
m=[ 0 0 1 1 0 0]; % Ideal magnitudes
w=[ 1220 1 1220 ]; % Error weight factors format long
b=remez(134,f,m,w) % (134+1) taps Parks-McClellan algorithm and Remez exchange
freqz(b,1,512,fs); % Plot the frequency response
axis([0 fs/2 -80 10])
0 Commenti
Risposte (1)
Satyajeet Sasmal
il 19 Nov 2015
Hi Zehaib
For your second filter specification, setting the axis limits to [0 fs/2 -80 10] forces your y-axis to be limited from -80 db to 10 db. Whereas, your Magnitude vs Frequency graph for the second case requires your magnitude to in the order of 2.4k db to 3k db (see image below)
Figure 1 is the second filter in your case.
Hope this answers your question.
-Satya
0 Commenti
Vedere anche
Categorie
Scopri di più su Filter Design in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!