2.1.22.2.2.6 fft_fft_filter


Description

Apply the window function on the frequency-domain of the signal.

Syntax

int fft_fft_filter(int iSize, double *vSig, double *vWindow);

Parameters

iSize
[input] the number of data values in both signal and window function.
vSig
[modify] Input: the signal sequence. Output: the result signal after applying the window.
vWindow
[Input] the window sequence.

Return

Returns 0 for success or error codes for failure.

Examples

EX1

//Assume the current Worksheet has 2 columns. This piece of code filters the data in the
//first column using the window sequence in the second column. The result is output
//into the third column.

#include <..\OriginLab\fft.h>
void fft_fft_filter_ex1()
{
	int n=8, success;
	Worksheet wks = Project.ActiveLayer();
	if(wks)
	{
		Dataset xx(wks, 0);
		Dataset yy(wks, 1);
		Dataset aa(wks, 2);
	
		vector x = xx;
		vector y = yy;
			
		success = fft_fft_filter(n, x, y);
		aa = x;
	}
}

Remark

See Also

Header to Include

fft.h

Reference