Window functions collection

Functions

int dspl_window (double *w, int n, int win_type, double param)
 Window function calculation. More...
 

Detailed Description

Function Documentation

◆ dspl_window()

int dspl_window ( double *  w,
int  n,
int  win_type,
double  param 
)

Window function calculation.

This function calculates periodic or symmetric window according to win_type parameter.

Periodic window function can be used for a spectral analysis, Symmetric window is most useful for FIR filters synthesis.

Parameters
[in,out]wWindow function vector pointer. Vector size is [n x 1]. Memory must be allocated.
[in]nWindow function vector size.
[in]win_typeBit string for set window function type.
This parameter is bit masks combination DSPL_WIN_MASK | DSPL_WIN_SYM_MASK.
Bit mask DSPL_WIN_MASK sets window function type:
Value DSPL_WIN_MASK Description
DSPL_WIN_BARTLETT Non-parametric Bartlett window
DSPL_WIN_BARTLETT_HANN Non-parametric Bartlett-Hann window
DSPL_WIN_BLACKMAN Non-parametric Blackman window
DSPL_WIN_BLACKMAN_HARRIS Non-parametric Blackman-Harris window
DSPL_WIN_BLACKMAN_NUTTALL Non-parametric Blackman-Nuttall window
DSPL_WIN_COS Non-parametric cosine window
DSPL_WIN_FLAT_TOP Non-parametric flat top window
DSPL_WIN_GAUSSIAN Parametric Gaussian window
DSPL_WIN_HAMMING Non-parametric Hamming window
DSPL_WIN_HANN Non-parametric Hann window
DSPL_WIN_LANCZOS Non-parametric Lanczos window
DSPL_WIN_NUTTALL Non-parametric Nuttall window
DSPL_WIN_RECT Non-parametric rectangular window
Bit mask DSPL_WIN_SYM_MASK sets symmetric or periodic window:
Value DSPL_WIN_SYM_MASK Description
DSPL_WIN_SYMMETRIC Symmetric window (by default)
DSPL_WIN_PERIODIC Periodic window
[in]paramWindow function parameter. This parameter for parametric windows only.
Returns
DSPL_OK window function is calculated successfully.
Errors:
DSPL_ERROR_PTR Pointer error. Pointer w cannot be NULL.
DSPL_ERROR_SIZE Size error. Window function vector size w cannot be less than two.
DSPL_ERROR_WIN_TYPE win_type parameter error. Unknown window function.
Author
Sergey Bakhurin. www.dsplib.org

Select spelling error with your mouse and press
Description(not nessesary)
Close X