26 Using fdatool in Matlab design a low pass IIR Butterworth
26. Using fdatool in Matlab, design a low pass IIR Butterworth filter for the specification given in proble 24. What is the minimum filter order that achieves or exceeds the specification? Attach a magnitude frequency response plot of the filter you designed. Include a \"zoom\" of the entire pass band to show that your design meets the specification in that band. Do the same for the stop band. Plot and attach the group delay of the filter you designed. order =
Solution
fs=8000; % Sampling rate filter
Order=5; % Order of filter
cutOffFreq=1000; % Cutoff frequency
[b, a]=butter(filterOrder, cutOffFreq/(fs/2), \'low\'); % === Plot frequency response
[h, w]=freqz(b, a);
plot(w/pi*fs/2, abs(h), \'.-\');
title(\'Magnitude frequency response\');
grid on
