User`s guide
Magnitude FFT
5-277
5Magnitude FFT
Purpose Compute a nonparametric estimate of the spectrum using the periodogram 
method.
Library Estimation / Power Spectrum Estimation
Description The Magnitude FFT block computes a nonparametric estimate of the spectrum 
using the periodogram method. When the 
Output parameter is set to 
Magnitude squared, the block output for an input u is equivalent to 
y = abs(fft(u,nfft)).^2 % Equivalent MATLAB code
When the Output parameter is set to Magnitude, the block output for an 
input u is equivalent to 
y = abs(fft(u,nfft))  % Equivalent MATLAB code
Both an M-by-N frame-based matrix input and an M-by-N sample-based 
matrix input are treated as M sequential time samples from N independent 
channels. The block computes a separate estimate for each of the N 
independent channels and generates an N
fft
-by-N matrix output. When 
Inherit FFT length from input dimensions is selected, N
fft
 is specified by the 
frame size of the input, which must be a power of 2. When 
Inherit FFT length 
from input dimensions
 is not selected, N
fft
 is specified as a power of 2 by the 
FFT length parameter, and the block zero pads or truncates the input to N
fft
before computing the FFT.
Each column of the output matrix contains the estimate of the corresponding 
input column’s power spectral density at N
fft
 equally spaced frequency points 
in the range [0,F
s
), where F
s
 is the signal’s sample frequency. The output is 
always sample-based.
Example The dspsacomp demo compares the periodogram method with several other 
spectral estimation methods.










