`(y)=fft(x)`

Inputs | |

`x` |
An array of real or complex numbers. |

Outputs | |

`y` |
An array of complex numbers. |

If the input is a one-dimensional array, the output of

`fft`

is the Fast Fourier Transform of the input. Prior
to the computation of the transform, the input is
padded with sufficient number of zeros so that the size of the padded
array is a power of `2`

.
If the input is a two-dimensional array, the output is a matrix with the same number of columns as in the input, with each column of

`y`

computed
from the corresponding column of `x`

in the manner described above.
>>x=[0:.1:1024]';>>y=sin(6pi*x)+3*cos(7.6pi*x)+2sin(9.8pi*x)+randn(size(x))*.1>>subplot(2,1,1)>>plot(x,y)>>title("Time Series")>>z=fft(y)>>n=size(z,1);>>subplot(2,1,2)>>plot(abs(z[1:n/2+1]))>>title("FFT")