【お知らせ】この部分は英語原文のみでの提供となります。何卒ご了承ください。
2.1.22.2.1.11 fftw_fft_multiple_complex
Contents
Description
Computes the discrete Fourier transforms of iSequences sequences of iSize complex data values
Syntax
int fftw_fft_multiple_complex( int iSequences, int iSize, d_complex * vSig, FFT_SIGN iSign = FFT_FORWARD )
Parameters
- iSequences
- [input] the number of sequences
- iSize
- [input] the number of data values in each sequence.
- vSig
- [modify] the complex data sequences for input and the result data after fourier transformation for output
- 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
//Assume the current Worksheet has 3 sequences of complex data values stored in the first //two columns. The first column contains the real part, and the second column imaginary //part. This piece of code computers the discrete Fourier transform. The result is //output into the third and the fourth columns. An inverse transform is performed, //and the result is output into the fifth and the sixth columns. #include <..\originlab\fft.h> void TEST_fftw_fft_multiple_complex() { int iSeq=3, iL=7, success; int n = iSeq*iL; Worksheet wks = Project.ActiveLayer(); if(wks) { Dataset xx(wks, 0); Dataset yy(wks, 1); Dataset aa(wks, 2); aa.SetSize(n); Dataset bb(wks, 3); bb.SetSize(n); Dataset cc(wks, 4); cc.SetSize(n); Dataset dd(wks, 5); dd.SetSize(n); vector x = xx, y = yy; //make a complex vector by x and y vector<complex> vc; vc.MakeComplex(x, y); ///FT success = fftw_fft_multiple_complex(iSeq, iL, vc); vc.GetReal(x); vc.GetImaginary(y); aa = x; bb = y; ///IFT success = fftw_fft_multiple_complex(iSeq, iL, vc, FFT_BACKWARD); vc.GetReal(x); vc.GetImaginary(y); cc = x; dd = y; } }
Remark
See Also
Header to Include
fft.h