%============================================================
%===== LOW PASS Filter Desinged Using A Bartlett Window =====
%============================================================

Fs=400;
wn=[0.25];
[b,a]=fir1(201,wn,bartlett(202));
[H,w]=freqz(b,a,512);

figure(1);
plot(w*Fs/(2*pi),abs(H));
title('LOW PASS Filter Designed Using A Bartlett Window');
xlabel('Frequency (Hz)');
ylabel('Magnitude of Frequency Response');
grid on