rectform SciMax Toolbox rediff

SciMax Toolbox >> recttopolar

recttopolar

Maxima Function

Calling Sequence

recttopolar (real_array, imaginary_array)

Description

Translates complex values of the form a + b %i to the form r %e^(%i t). load ("fft") loads this function into Maxima. See also .

The real and imaginary parts, a and b, are taken from real_array and imaginary_array, respectively. The original values of the input arrays are replaced by the magnitude and angle, r and t, on return. The outputs are calculated as

r: sqrt (a^2 + b^2)
t: atan2 (b, a)

The computed angle is in the range -%pi to %pi.

The input arrays must be the same size and 1-dimensional. The array size need not be a power of 2.

recttopolar is the inverse function of polartorect.

rectform SciMax Toolbox rediff