MATLAB CODE TO DESIGN A FIR LOW PASS FITTER USING HAMMING & BLACKMAN WINDOW

CODE:


clear all;
wc=0.5*pi; % cutoff freq.
N=25;
b=fir1(N,wc/pi,hamming(N+1));
w=0:.01:pi;
h=freqz(b,1,w);
plot(w/pi,abs(h));
hold on
b=fir1(N,wc/pi,blackman(N+1));

w=0:.01:pi;
h=freqz(b,1,w);
plot(w/pi,abs(h),'-');grid;
xlabel('Normalised frequency \omega/\pi');
ylabel('Magnitude');
hold off

OUTPUT:

 

0 comments:

Post a Comment