Calculates the 2D FFT of an array in polar (magnitude-phase) form.
FFTP2(array, rowlen, collen)
array |
- |
An input array. |
rowlen |
- |
Optional. An integer, the FFT row size. Defaults to |
collen |
- |
Optional. An integer, the FFT column size. Defaults to |
A complex array.
fftp2({{1, 2}, {3, 4}})
returns the complex polar array:
{{10*exp(i*0), 2*exp(i*PI)},
{ 4*exp(i*PI), 0*exp(i*0)}}
(x, y) = fxyvals(-2, 2, .1, -2, 2, .1);
W1: cos(x*y);setplottype(3);rainbow
W2: fftp2(W1)
W3: fftshift(log10(mag(W2)))
W4: fftshift(phase(W2))
Produces interesting 2D magnitude and phase images.
FFTP2 is often used in image processing applications.
Use FFTSHIFT to flip the output so the 0 frequency is in the center of the plot.
If rowlen is larger than the number of input rows or collen is greater than the number input of columns, the input is zero-padded.
If the input data is a series (i.e. a single column), a 1D FFT is performed.