function draw_pz_plot(zs,ps)
%
%  function draw_ps_plot(zs,ps)
%
%  Draw a pole zero plot, where
%
%    zs -- vector of zeros
%    ps -- vector of poles
%

% convert zs and ps to row vectors

zs = zs(:).';
ps = ps(:).';

% find the scale factor

mx = max(abs([zs ps 1.0]));
mx = mx*1.125;

% plot axes

plot([0 0], [-mx mx],'-')
text(0.05*mx,mx,'Im');
hold on
plot([-mx mx], [0 0],'-');
text(mx,-0.05*mx,'Re');

% plot unit circle

f = [-0.5:0.01:0.5];
plot(cos(2*pi*f),sin(2*pi*f),':');

% plot poles and zeros

plot(real(zs),imag(zs),'o');
plot(real(ps),imag(ps),'x');

% make the plot square

axis(1.25*[-mx mx -mx mx]);
axis('square');
hold off