% Part (e)

b3 = [ 0.25 0 0.25 ];
a3 = [ 1 2 17 ];
pzplot(b3,a3,-0.5);
title('H_3(s)');
print H3_poles_zeros.eps -deps

omega = linspace(-10,10,1000);
h3 = freqs(b3,a3,omega);
plot(omega,abs(h3));
title('|H_3(j\omega)|');
xlabel('\omega');
print H3_freq.eps -deps

omega = [-10:0.5:10];
sigma = -1 + (1/8)*[1:32];
[sigmagrid,omegagrid] = meshgrid(sigma,omega);
sgrid = sigmagrid + j*omegagrid;
H3 = polyval(b3,sgrid) ./ polyval(a3,sgrid);
mesh(sigma,omega,abs(H3));
title('H_3(s)');
xlabel('\sigma=\Re\{s\}');
ylabel('\omega=\Im\{s\}');
print H3_surf.eps -deps

% The addition of zeros at +/-0.5j has had the effect of tying
% the surface plot and frequency response to zero at +/-0.5j,
% and by continuity, lowering the region in between the two poles
% noticeably.
