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

  1. function B = fstab(A);
  2. %FSTAB    FSTAB(A) stabilizes a MONIC polynomial with respect to the
  3. %    unit circle, i.e. roots whose magnitudes are greater than
  4. %    one are reflected into the unit circle.  The result is a monic
  5. %    polynomial as well.
  6.  
  7. %       L.Ljung 2-10-92
  8. %    Copyright (c) 1992 by the MathWorks, Inc.
  9.  
  10. if length(A)==1,B=A;return,end
  11. v = roots(A); ind=(abs(v)>eps);
  12. vs = 0.5*(sign(abs(v(ind))-1)+1);
  13. v(ind) = (1-vs).*v(ind) + vs./ (conj(v(ind)));
  14. B = poly(v);
  15. if ~any(imag(A)),B=real(B);end
  16.  
  17.