2.1.22.2.1.31 fft_fft_multiple_real
Description
computes the discrete Fourier transforms of iSequences sequences of iSize real
data values. For forward FT, each output sequence is in Hermitian form; For
backward FT, each input sequence is in Hermitian form.
Syntax
int fft_fft_multiple_real( int iSequences, int iSize, double * 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 input data sequences to be transformed, and the result of the Fourier transforms.
- 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 real data values stored in the first
//column successively. This piece of code computers the discrete Fourier transform.
//The result is output into the second column. An inverse transform is performed,
//and the result is output into the third column.
#include <..\originlab\fft.h>
void TEST_fft_fft_multiple_real()
{
int iSeq=3, iL=7, success;
int n = iSeq*iL;
Worksheet wks = Project.ActiveLayer();
if(wks)
{
Dataset xx(wks, 0);
Dataset aa(wks, 1);
aa.SetSize(n);
Dataset bb(wks, 2);
bb.SetSize(n);
vector x = xx;
///FT
success = fft_fft_multiple_real(iSeq, iL, x);
aa = x;
///IFT
success = fft_fft_multiple_real(iSeq, iL, x, FFT_BACKWARD);
bb = x;
}
}
Remark
See Also
fft_fft_multiple_complex
Header to Include
fft.h
Reference
|