fft_fft_convolution

 

Description

calculates the circular convolution of two real vectors of period iSize.

Syntax

int fft_fft_convolution( int iSize, double * vSig1, double * vSig2 )

Parameters

iSize
[input] the number of data values.
vSig1
[modify] one sequences of period iSize for input, and the corresponding elements of the discrete convolution for output.
vSig2
[modify] the other sequences of period iSize for input, and the discrete Fourier transform of the convolution for output.

Return

Returns 0 for success or error codes for failure.

Examples

EX1

//Assume the current Worksheet has 4 columns, the first two columns contain 2 sets of real
//data values. This piece of code computes the circular convolution of two real vectors.
//The result is output into the third column, and it's Fourier transform is in the
//fourth column.
 
#include <..\originlab\fft.h>    
void TEST_fft_fft_convolution()
{
    int n=8, success;
    Worksheet wks = Project.ActiveLayer();
    if(wks)
    {
        Dataset xx(wks, 0);
        Dataset yy(wks, 1);
        Dataset aa(wks, 2);
        Dataset bb(wks, 3);
        vector x = xx;
        vector y = yy;
 
        success = fft_fft_convolution(n, x, y);
        aa = x;
        bb = y;
    }
}

Remark

See Also

fft_fft_deconvolution

Header to Include

fft.h

Reference