title: Plotting a zplot using Matlab
body: <p>I am trying to plot a zplot in Matlab that displays a unit circle, centered at 0 along with the poles and zeros of the plot. I am not allowed to use any other matlab function such as zplane or pzplot to do this. So far I am able to plot a unit circle just fine but I am having trouble getting my plot to display more of the axis without warping my circle. I also am having a heard time finding the poles and zeros of my function and also how to display the poles as little x's and the zeros as little o's on my plot. Any help would be greatly appreciated! My assignment looks like this and must correctly handle cases such as </p>
  
  <p>zplot([0 1 1], [0 1]);
  zplot([0 1 1], [0 0 1]);</p>
  
  <pre><code>function zplot(b, a)
  
  % ZPLOT Plot a zero-pole plot.
  
                                                -1 -nb
                B(z) b(1) + b(2)z + .... + b(nb+1)z
  
       H(z) = ---- = ---------------------------------
  
                                                -1 -na
                A(z) a(1) + a(2)z + .... + a(na+1)z
  
  % zplot(b, a) plots the zeros and poles which determined by vectors b and a
  
  % The plot includes the unit circle and axes for reference, plotted in black.
  
  % Each zero is represented with a blue 'o' and each pole with a red 'x' on the 
  %plot.
  
  xmin;   
  xmax;
  
  ymin;   
  ymax; 
  
  % vector of angles at which points are drawn
  
  angle = 0:2*pi/100:2*pi;            
  
  % Unit radius
  
  R = 1;               
  
  % Coordinates of the circle
  
  x = R*cos(angle);  
  y = R*sin(angle);  
  
  % Plot the circle
  
  plot(x,y);                             
  axis ([xmin, xmax, ymin, ymax]);
  
  grid on;
  
  end
  </code></pre>