2.1.22.2.1.30 fft_fft_multiple_complex

Description

computes the discrete Fourier transforms of iSequences sequences of iSize complex data values.

Syntax

int fft_fft_multiple_complex( int iSequences, int iSize, double * vSigReal, double * vSigImag, FFT_SIGN iSign = FFT_FORWARD )

Parameters

iSequences
[input] the number of sequences.
iSize
[input] the number of data values in each sequence.
vSigReal
[modify] the real part of the input sequences, and the real part of the output Fourier transforms.
vSigImag
[modify] the imaginary part of the input sequences, and the imaginary part of the output 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 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_fft_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;

///FT
success = fft_fft_multiple_complex(iSeq, iL, x, y);
aa = x;
bb = y;

///IFT
success = fft_fft_multiple_complex(iSeq, iL, x, y, FFT_BACKWARD);
cc = x;
dd = y;
}
}

fft.h