Filter out those frequency components in original data, whose power are greater than threshold.
int fft_threshold_filtering( int iSize, double * vSignal, double dThreshold )
Returns 0 for success or error codes for failure.
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; } }
fft.h