fft_one_side_spectrum

 

Description

Compute One Side Spectrum of FFT Result

Syntax

int fft_one_side_spectrum( int nSize, double * pSpectrum, bool bShifted = false )

Parameters

nSize
[input] size of input signal.
pSpectrum
[modify] Input: Amplitude of FFT Result; Output: One Side Spectrum of FFT Result.
bShifted
[Input] Specifies whether the result should be rearranged so that the lower frequency components are in the center

Return

Return 0 for success.

Examples

EX1

#include <..\OriginLab\fft.h>
void fft_one_side_spectrum_ex1()
{
    vector vsig = {0, 0, 0, 1, 1, 0, 0, 0};
    fft_fft_real(8, vsig);
    fft_one_side_spectrum(8, vsig);
}

Remark

See Also

header to Include

fft.h

Reference