I've been asked to plot the magnitude and phase response of this IIR filter.
$H(z)=\frac{0.0534(1+z^{-1})(1-1.0166z^{-1}+z^{-2})}{(1 - 0.683z^{-1})(1-1.4461z^{-1}+0.7957z^{-2})}$
And I've found a solution on the MatLab website which gives the following code:
b0 = 0.0534;
b1 = [1 1];
b2 = [1 -1.0166 1];
a1 = [1 -0.683];
a2 = [1 -1.4461 0.7957];
sos1 = [b0*[b1 0] [a1 0]];
sos2 = [b2 a2];
[h,w] = freqz([sos1;sos2],'whole',2001);
plot(w/pi,20*log10(abs(h)))
ax = gca;
ax.YLim = [-100 20];
ax.XTick = 0:.5:2;
xlabel('Normalized Frequency (\times\pi rad/sample)')
ylabel('Magnitude (dB)')

Which when the magnitude isn't plotted in decibels looks like a bandstop. Is this due to aliasing as when I produce the graphs myself I get the result below.
