r2polar
r2polar (z)
The r2polar function returns a complex value in polar coordinates derived from the complex value z which is assumed to be in rectangular coordinates. The magnitude is stored in the real part and the angle (in radians) is stored in the imaginary part of the returned complex value.
Examples
Assume waveIn and waveOut are complex.
waveOut= r2polar(waveIn)
sets each point of waveOut to the polar coordinates derived from the real and imaginary parts of waveIn.
You may get unexpected results if the number of points in waveIn differs from the number of points in waveOut because of interpolation.