Fast Fourier transform (FFT) of input
DSP System Toolbox / Transforms
The FFT block computes the fast Fourier transform (FFT) across the first
dimension of an ND input array, u. The block
uses one of two possible FFT implementations. You can select an implementation based on
the FFTW library or an implementation based on a collection of Radix2 algorithms. To
allow the block to choose the implementation, you can select
Auto
. For more information about the FFT implementations,
see Algorithms.
For userspecified FFT lengths not equal to P, zero padding or truncating, or modulolength data wrapping occurs before the FFT operation. For an FFT with P ≤ M:
y = fft(u,M) % P ≤ M
Wrapping:
y(:,L) = fft(datawrap(u(:,L),M)) % P > M; L = 1,...,N
Truncating:
y (:,L) = fft(u,M) % P > M; L = 1,...,N
Tip
When the input length, P, is greater than the FFT length, M, you may see magnitude increases in your FFT output. These magnitude increases occur because the FFT block uses moduloM data wrapping to preserve all available input samples.
To avoid such magnitude increases, you can truncate the length of your input sample, P, to the FFT length, M. To do so, place a Pad block before the FFT block in your model.
Data Types 

Direct Feedthrough 

Multidimensional Signals 

VariableSize Signals 

ZeroCrossing Detection 

^{[a]} Variablesize signals are only supported when the Inherit FFT length from input dimensions checkbox is selected. 
[1] Orfanidis, S. J. Introduction to Signal Processing. Upper Saddle River, NJ: Prentice Hall, 1996, p. 497.
[2] Proakis, John G. and Dimitris G. Manolakis. Digital Signal Processing, 3rd ed. Upper Saddle River, NJ: Prentice Hall, 1996.
[3] FFTW (http://www.fftw.org
)
[4] Frigo, M. and S. G. Johnson, “FFTW: An Adaptive Software Architecture for the FFT,”Proceedings of the International Conference on Acoustics, Speech, and Signal Processing, Vol. 3, 1998, pp. 13811384.