Admin Production ni-theme
Current Publication

FFT

LabWindows/CVI

FFT

Advanced Analysis Library Only

AnalysisLibErrType FFT (double arrayXReal[], double arrayXImaginary[], ssize_t numberOfElements);

Purpose

Note Note  This function has been superseded by CxFFTEx. CxFFTEx includes additional parameters, which makes it more versatile than FFT.

Calculates the Fast Fourier Transform (FFT) of the complex data.

Let X = x + jy be the complex array:

Y = FFT(X)

FFT can perform the operation in place and overwrite the input arrays.

Example Code

/* Generate two arrays with random numbers and calculate the Fast Fourier Transform. */
double x[256], y[256];
n;
n = 256;
Uniform (n, 17, x);
Uniform (n, 17, y);
FFT (x, y, n);

Parameters

Input
Name Type Description
numberOfElements ssize_t Number of elements in the input arrays.
Output
Name Type Description
arrayX_Real double [] On input, the real part of complex array used to compute the FFT.

On output, the real part of the FFT.

This operation is performed in place, meaning the values in this array are overwritten.
arrayX_Imaginary double [] On input, the imaginary part of complex array used to compute the FFT.

On output, the imaginary part of the FFT.

This operation is performed in place, meaning the values in this array are overwritten.

Return Value

Name Type Description
status AnalysisLibErrType A value that specifies the type of error that occurred. Refer to analysis.h for definitions of these constants.

Additional Information

Library: Advanced Analysis Library

Include file: analysis.h

LabWindows/CVI compatibility: LabWindows/CVI 3.1 and later

Examples

Refer to the following examples that use the FFT function:

  • analysis\2dfft.cws

    Open example
  • analysis\parsevls.cws

    Open example
  • OpenMP\2dfft_omp.cws

    Open example