home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 10 / 10.iso / l / l455 / 9.ddi / IDENT.DI$ / ZPSDPL.M < prev    next >
Encoding:
Text File  |  1993-03-11  |  776 b   |  27 lines

  1. function zpsdpl(zepo,sd,w,iz,mark1,mark2)
  2. %ZPSDPL    plots standard deviations in zepo-pole plots
  3. %
  4. %    zpsdpl(zepo,sd,w,iz,mark1,mark2)
  5. %
  6. %    This is a help function to zpplot.
  7.  
  8. %    L.Ljung 7-2-87
  9. %    Copyright (c) 1987 by the Mathworks, Inc.
  10. %    All rights reserved
  11.  
  12. for k=iz
  13.     if imag(zepo(k,1))==0
  14.     rp=real(zepo(k,1)+sd*zepo(k,2)*[-1 1]);
  15.     [mr,nr] = size(rp);
  16.     plot(rp,zeros(mr,nr),mark1)
  17.     else if imag(zepo(k,1))>0
  18.          r1=real(zepo(k,2));r2=imag(zepo(k,2));r3=zepo(k+1,2);
  19.      p1=r1*r1;p2=r2*r2;p3=r3*r1*r2;
  20.      SM=[p1 p3;p3 p2]; [V,D]=eig(SM); z1=real(w)*sd*sqrt(D(1,1));
  21.      z2=imag(w)*sd*sqrt(D(2,2)); X=V*[z1;z2];
  22.      X=[X(1,:)+real(zepo(k,1));X(2,:)+imag(zepo(k,1))];
  23.      plot(X(1,:),X(2,:),mark2,X(1,:),-X(2,:),mark2)
  24.          end
  25.     end
  26. end
  27.