%================================================================
%===== A Low Pass Filter, (An Odd Order Filter).            =====
%===== A Hamming Window Has Been Used To Design The Filter. =====
%===== A 51st Order Filter Has Been Used.                   =====
%================================================================

Fs=400;
wn=[0.25];
[b,a]=fir1(50,wn,hamming(51));
[H,w]=freqz(b,a,512);

figure(1);
plot(w*Fs/(2*pi),abs(H));
title('A LOW PASS Filter With A Hamming Window');
xlabel('Frequency (Hz)');
ylabel('Mangitude of frequency Response');
grid on