fft_threshold_filtering

 

Description

Filter out those frequency components in original data, whose power are greater than threshold.

Syntax

int fft_threshold_filtering( int iSize, double * vSignal, double dThreshold )

Parameters

iSize
[input] the number of data values in the signal.
vSignal
[modify] the signal for input, and the signal after filtering for output
dThreshold
[input] fitering threshold.

Return

Returns 0 for success or error codes for failure.

Examples

EX1

//Assume the current Worksheet exists and has 2 columns. The first column contains the
//data to be filtered, the second column contains the result.

#include <..\originlab\fft.h>    
void TEST_fft_threshold_filtering()
{
    int n=256, success;
    double dThreshold=5.0;
    Worksheet wks = Project.ActiveLayer();
    if(wks)
    {
        Dataset xx(wks, 0);
        Dataset aa(wks, 1);
                
        vector x = xx;
        
        success = fft_threshold_filtering(n, x, dThreshold);
        aa = x;
    }
}

Remark

See Also

header to Include

fft.h

Reference