home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 10 / 10.iso / l / l460 / 2.ddi / ELFUN.DI$ / ANGLE.M < prev    next >
Encoding:
Text File  |  1993-03-07  |  304 b   |  16 lines

  1. function p = angle(h)
  2. %ANGLE    Phase angle.
  3. %    ANGLE(H) returns the phase angles, in radians, of a matrix with
  4. %    complex elements.  
  5. %
  6. %    See also ABS, UNWRAP.
  7.  
  8. %    Copyright (c) 1984-93 by The MathWorks, Inc.
  9.  
  10. % Clever way:
  11. % p = imag(log(h));
  12.  
  13. % Way we'll do it:
  14. p = atan2(imag(h), real(h));
  15.  
  16.