SigPack - the C++ signal processing library
Window

Functions

arma_inline arma::vec sp::cos_win (const arma::uword N, const arma::vec &a)
 
arma_inline arma::vec sp::hamming (const arma::uword N)
 
arma_inline arma::vec sp::hann (const arma::uword N)
 
arma_inline arma::vec sp::blackman (const arma::uword N)
 
arma_inline arma::vec sp::blackmanharris (const arma::uword N)
 
arma_inline arma::vec sp::flattopwin (const arma::uword N)
 
arma_inline arma::vec sp::hanning (const arma::uword N)
 
arma_inline arma::vec sp::kaiser (const arma::uword N, double beta)
 
arma_inline arma::vec sp::triang (const arma::uword N)
 

Detailed Description

See window functions at Wikipedia

Function Documentation

◆ blackman()

arma_inline arma::vec sp::blackman ( const arma::uword  N)

Blackman window.

\( w_i = 0.42-0.5\ cos(2\pi i /(N-1))+0.08\ cos(4\pi i /(N-1))\)

Parameters
NNr of taps

Definition at line 72 of file window.h.

References sp::cos_win().

Here is the call graph for this function:

◆ blackmanharris()

arma_inline arma::vec sp::blackmanharris ( const arma::uword  N)

Blackman-Harris window. Symmetric BH4 window.

\( w_i = 0.359-0.488\ cos(2\pi i /(N-1))+0.141\ cos(4\pi i /(N-1))-0.011\ cos(6\pi i /(N-1))\)

Parameters
NNr of taps

Definition at line 89 of file window.h.

References sp::cos_win().

Referenced by sp::fd_filter().

Here is the call graph for this function:

◆ cos_win()

arma_inline arma::vec sp::cos_win ( const arma::uword  N,
const arma::vec &  a 
)

Generic fifth order symmetric cos window.

\( w_i = a_0-a_1\ cos(2\pi i /(N-1))+a_2\ cos(4\pi i /(N-1))-a_3\ cos(6\pi i /(N-1))+a_4\ cos(8\pi i /(N-1))\)

Returns
The cosinus window based on the a vector
Parameters
NNumber of window taps
aA vector of cosinus coefficients

Definition at line 25 of file window.h.

References sp::PI_2.

Referenced by sp::blackman(), sp::blackmanharris(), sp::flattopwin(), sp::hamming(), and sp::hann().

◆ flattopwin()

arma_inline arma::vec sp::flattopwin ( const arma::uword  N)

Flattop window.

\( w_i = 0.216-0.417\ cos(2\pi i /(N-1))+0.277\ cos(4\pi i /(N-1))-0.084\ cos(6\pi i /(N-1))+0.007\ cos(8\pi i /(N-1))\)

Parameters
NNr of taps

Definition at line 106 of file window.h.

References sp::cos_win().

Here is the call graph for this function:

◆ hamming()

arma_inline arma::vec sp::hamming ( const arma::uword  N)

Hamming window.

\( w_i = 0.54-0.46\ cos(2\pi i /(N-1))\)

Parameters
NNr of taps

Definition at line 44 of file window.h.

References sp::cos_win().

Referenced by sp::fir1(), sp::fir1_bp(), sp::fir1_bs(), sp::fir1_hp(), sp::psd(), and sp::specgram_cx().

Here is the call graph for this function:

◆ hann()

arma_inline arma::vec sp::hann ( const arma::uword  N)

Hann window.

\( w_i = 0.5-0.5\ cos(2\pi i /(N-1))\)

Parameters
NNr of taps

Definition at line 58 of file window.h.

References sp::cos_win().

Here is the call graph for this function:

◆ hanning()

arma_inline arma::vec sp::hanning ( const arma::uword  N)

Hanning window.

\( w_i = 0.5-0.5\ cos(2\pi (i+1) /(N+1))\)

Parameters
NNr of taps

Definition at line 123 of file window.h.

References sp::PI_2.

◆ kaiser()

arma_inline arma::vec sp::kaiser ( const arma::uword  N,
double  beta 
)

Kaiser window.

See Kaiser window at Wikipedia

Parameters
NNr of taps
betaBeta factor

Definition at line 141 of file window.h.

References sp::besseli0().

Here is the call graph for this function:

◆ triang()

arma_inline arma::vec sp::triang ( const arma::uword  N)

Triangle window.

See Triangle window at Wikipedia

Parameters
NNr of taps

Definition at line 159 of file window.h.