Contents Previous Next Subchapters

Angle Corresponding to a Complex Value
Syntax angle(z)
See Also atan2 , log , exp

Description
Returns a double precision matrix containing the element-by-element angle between the direction vector
     ( Re(z), Im(z) )
where and the real axis where Re(z) and Im(z) above are the real and imaginary parts of the complex elements of z. The elements of the result are between -pi and +pi.

Example
     angle(1 + 1i0)
returns
     0.785398
If you enter
     angle( [-1r0, 1i0, 1r0, -1i0] )
returns
     [ 3.14159 , 1.5708 , 0 , -1.5708 ]