2.1.22.4.2 fft_smooth


Description

Performs fft smooth.

Syntax

int fft_smooth(int nSize, int npts, double cutoff, double *vInputX, double *vInputY, double *vSmooth, int pad = 0, int filter = LOW_PASS_PARABOLIC_FILTERING, int baseline = BASELINE_TWO_ENDS_1_PERCENT);

Parameters

nSize
[input] size of input signal
npts
[input] window size
cutoff
[input] cutoff frequency
vInputX
[input] input singal
vInputY
[input] input singal
vSmooth
[output] singal after smoothing
pad
[input] specifies whether to pad the number of data points to power of 2
filter
[input] filter type, include following type
LOW_PASS_FILTERING, low-pass filtering;
HIGH_PASS_FILTERING, high-pass filtering;
BAND_PASS_FILTERING, band-pass filtering;
BAND_BLOCK_FILTERING, band-block filtering;
LOW_PASS_PARABOLIC_FILTERING, low-pass parabolic filtering;
LOW_PASS_PARABOLIC_FILTERING_75, low-pass parabolic filtering used in 75 and eariler;
baseline
[input] specifies whether to subtract a baseline on the inout data before fft filtering is used. It can use the following value:
BASELINE_TWO_ENDS
BASELINE_TWO_ENDS_1_PERCENT
BASELINE_TWO_ENDS_20_PERCENT
BASELINE_NONE

Return

Return 0 for success.

Examples

EX1

#include <..\OriginLab\fft.h>
void fft_smooth_ex1()
{
	vector vx =		{0, 1, 2, 3, 4, 5, 6, 7};
	vector vsig = 	{0.84147,0.9093,0.14112,-0.7568,-0.95892,-0.27942,0.65699,0.98936};
	vector vSmooth;
	vSmooth.SetSize(8);
	fft_smooth(8, 1, 0.1, vx, vsig, vSmooth);
}

Remark

See Also

Header to Include

fft.h

Reference