【お知らせ】この部分は英語原文のみでの提供となります。何卒ご了承ください。
2.1.22.2.1.23 fft_fft_2d_real
Contents
Description
Calculates the 2 dimensional discrete Fourier transforms or inverse 2 dimensional discrete Fourier transforms.
Syntax
int fft_fft_2d_real( int iSizeX, int iSizeY, double * vSigReal, double * vSigImag, FFT_SIGN iSign = FFT_FORWARD )
Parameters
- iSizeX
- [input] the number of rows of the bivariate data sequence.
- iSizeY
- [input] the number of columns of the bivariate data sequence.
- vSigReal
- [modify] the real part of the complex data in input data, and the real part of the complex data in output data.
- vSigImag
- [output] the imaginary part of the complex data in output data.
- iSign
- [input] the transformation to carry out
- = FFT_FORWARD: FFT (by default)
- = FFT_BACKWARD: IFFT.
Return
Returns 0 for success or error codes for failure.
Examples
EX1
#include <..\originlab\fft.h> void fft_fft_2d_real_ex1() { int nRows = 5; int nCols = 5; matrix mReal(nRows, nCols), mImag(nRows, nCols); //Create matrix pages MatrixPage mPage1, mPage2,mPage3, mPage4, mPage5, mPage6; mPage1.Create("Origin"); mPage2.Create("Origin"); mPage3.Create("Origin"); mPage4.Create("Origin"); Matrix mat1(mPage1.GetName()),mat2(mPage2.GetName()), mat3(mPage3.GetName()), mat4(mPage4.GetName()); //Give the testing data into mReal and mImag for(int ii=0; ii<mReal.GetNumCols(); ii++) for(int jj = 0; jj<mReal.GetNumRows(); jj++) { mReal[jj][ii] = rnd(); } mImag = 0; //Forward FFT fft_fft_2d_real(nRows, nCols, mReal, mImag, FFT_FORWARD); mat1 = mReal; mat2 = mImag; //Backward FFT fft_fft_2d_real(nRows, nCols, mReal, mImag, FFT_BACKWARD); mat3 = mReal; mat4 = mImag; }
Remark
Calculates the 2 dimensional discrete Fourier transforms or inverse 2 dimensional
discrete Fourier transforms of a sequence of iSizeX*iSizeY real data values. Then
put the real part of result into vSigReal and put the imaginary part of result into
vSigImag.
See Also
Header to Include
fft.h