Complex Arithmetic
The following functions are available for working with complex
numbers. Each expects a single argument. Given a matrix they work on
an element by element basis. In the descriptions of the following
functions
z is the complex number x + iy where i is
defined as sqrt (-1)
.
Compute the magnitude of z defined as
|z| = sqrt (x^2 + y^2) .
For example
abs (3 + 4i)
=> 5
|
arg (z)
|
Mapping Function |
angle (z)
|
Mapping Function |
Compute the argument of z defined as
theta = atan ( y/ x) .
in radians.
For example
arg (3 + 4i)
=> 0.92730
|
conj (z)
|
Mapping Function |
Return the complex conjugate of z defined as
conj ( z) = x - iy.
|
imag (z)
|
Mapping Function |
Return the imaginary part of z as a real number.
|
real (z)
|
Mapping Function |
Return the real part of z.
|