Using FFT, I want to plot a Magnitude Frequency Characteristic of a Digital FIR filter.
1 vue (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Martins Jancevskis
le 8 Sep 2019
Réponse apportée : Urmila Rajpurohith
le 11 Sep 2019
my filter is defined by y(n)=x(n)+0.75x(n-1)+0.5x(n-2)+0.25x(n-3). This filter should have 256 points. IBased on this characteristic, is it a low pass filter?
I am trying to plot a magnitude/frequency graph but I get a bad plot.
clc;
clear all;
b0 = 0.25;
b1 = [4 3 2 1];
b = conv(b1,b0);
[h,w]=freqz(b,256);
plot(w/pi, 20*log10(abs(h)))
ax = gca;
ax.YLim = [-100 20];
ax.XTick = 0:0.1:10;
xlabel('Normalized Frequency')
ylabel('Magnitude (dB)')
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/237461/image.jpeg)
0 commentaires
Réponse acceptée
Urmila Rajpurohith
le 11 Sep 2019
You can get Magnitude plot by running the below code
clc;
clear all;
b0 = 0.25;
b1 = [4 3 2 1];
b = conv(b1,b0);
freqz(b,256);
And from magnitude plot it is observed that the filter is a Low pass filter.
0 commentaires
Plus de réponses (0)
Voir également
Catégories
En savoir plus sur Digital Filter Analysis dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!