home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 10 / 10.iso / l / l450 / 1.ddi / MATPAK.1 / arc / ANGLE.M < prev    next >
Encoding:
Text File  |  1988-06-10  |  238 b   |  11 lines

  1. function p = angle(h)
  2. %ANGLE    ANGLE(H) returns the phase angles, in radians, of a matrix with
  3. %    complex elements.  Use ABS for the magnitudes.
  4.  
  5. % Clever way:
  6. % p = imag(log(h));
  7.  
  8. % Way we'll do it:
  9. p = atan2(imag(h), real(h));
  10.  
  11.