Digital Filter

You might also like

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 1

fs=145; % Sampling frequency

cutoffFreq=65; % Cutoff frequency


allH=[]
for filterorder=1:3;
[b, a]=butter(filterorder, cutoffFreq/(fs/2), 'low');
[h, w]=freqz(b, a);
allH =[allH,h];
end
plot(w/pi*fs/2, abs(allH),'LineWidth',4);
title('Butterworth third order low pass digital filter');
ylabel('Sequar Magnitude in (dB)');
xlabel('Frequancy in (Hz)');
legend('order=1', 'order=2','order=3');

You might also like