function myplot(B, A)
%  myplot plots the amplitude response,
%  phase response and impulse response.
%  Use: myplot(B, A)
[H, w] = freqz(B, A);
subplot(2,2,1);
plot(w, abs(H));        title('Amplitude response');
xlabel('\omega (rad)'); grid on;

subplot(2,2,3);
plot(w, 20*log10(abs(H)));   ylabel('decibels');
xlabel('\omega (rad)'); grid on;

subplot(2,2,2);
plot(w, angle(H));      title('Phase response');
xlabel('\omega (rad)'); grid on;

subplot(2,2,4);
impz(B, A);