Calculates the 2 dimensional discrete Fourier transforms or inverse 2 dimensional discrete Fourier transforms.
int fft_fft_2d_real( int iSizeX, int iSizeY, double * vSigReal, double * vSigImag, FFT_SIGN iSign = FFT_FORWARD )
Returns 0 for success or error codes for failure.
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; }
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.
fft.h