| DSP Blockset | ![]() |
Example: Using the FFT Block
In the model below, the Sine Wave block generates two frame-based sinusoids, one at 15 Hz and the other at 40 Hz. The sinusoids are summed point-by-point to generate the compound sinusoid
which is then transformed to the frequency domain using an FFT block.
To build the model, make the following parameter settings:
Rows.
Magnitude.
Frequency in the Scope properties panel
Magnitude in the Axis properties panel
inf, and start the simulation by selecting Start from the Simulation menu.
The scope shows the two peaks at 0.015 and 0.04 kHz, as expected.
Note that the three-block sequence of FFT, Complex to Magnitude-Angle, and Vector Scope could be replaced by a single Spectrum Scope block, which computes the magnitude FFT internally.
Other blocks that compute the FFT internally are the blocks in the Power Spectrum Estimation library. See Power Spectrum Estimation for more information about these blocks.
| Using the FFT and IFFT Blocks | Example: Using the IFFT Block | ![]() |
Learn more about the latest releases of MathWorks products: |
| © 1994-2009 The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |