Generate window signal.
int get_window_data( int nWindowMethod, int nSize, vector & vWindow, double dAlpha = 0, double dBeta = 0 )
Returns OE_NOERROR for success or error codes for failure.
Prior to compilation, load fft_utils.c to the workspace by executing the following LabTalk command:
Run.LoadOC("Originlab\fft_utils.c", 16);
To retain fft_utils.c in the workspace for successive sessions, drag and drop the file from the Temporary folder to the System folder.
EX1
#include <fft_utils.h> void get_window_data_ex1() { //enum { // Window method //Rectangle_Win = 0, //Welch_Win, //Triangular_Win, //Bartlett_Win, //Hanning_Win, //Hamming_Win, //Blackman_Win, //Gaussian_Win, //Kaiser_Win, //Parzen_Win //}; int nSize = 50, nType = 1; vector vWindow(nSize); ///Create a Welch window for example int nRet = get_window_data(nType, nSize, vWindow); if( 0 != nRet ) { printf("get_window_data function returned error: %d\n", nRet); return; } }
fft_utils.h