IT++ 4.3.1

Windowing functions. More...

Functions

vec itpp::hamming (int size)
 Hamming window.
vec itpp::hanning (int n)
 Hanning window.
vec itpp::hann (int n)
 Hanning window compatible with matlab.
vec itpp::blackman (int n)
 Blackman window.
vec itpp::triang (int n)
 Triangular window.
vec itpp::sqrt_win (int n)
 Square root window.
vec itpp::chebwin (int n, double at)
 Dolph-Chebyshev window.

Detailed Description

Windowing functions.

Function Documentation

◆ hamming()

ITPP_EXPORT vec itpp::hamming ( int size)

Hamming window.

The n size Hamming window is a vector \(w\) where the \(i\)th component is

\[w_i = 0.54 - 0.46 \cos(2\pi i/(n-1)) \]

Definition at line 43 of file window.cpp.

References hamming(), and pi.

Referenced by fir1(), hamming(), and itpp::FIR_Fading_Generator::Jakes_filter().

◆ hanning()

ITPP_EXPORT vec itpp::hanning ( int n)

Hanning window.

The n size Hanning window is a vector \(w\) where the \(i\)th component is

\[w_i = 0.5(1 - \cos(2\pi (i+1)/(n+1)) \]

Observe that this function is not the same as the hann() function which is defined as in matlab.

Definition at line 56 of file window.cpp.

References hanning(), and pi.

Referenced by hanning(), and spectrum().

◆ hann()

ITPP_EXPORT vec itpp::hann ( int n)

Hanning window compatible with matlab.

The n size Hanning window is a vector \(w\) where the \(i\)th component is

\[w_i = 0.5(1 - \cos(2\pi i/(n-1)) \]

Definition at line 67 of file window.cpp.

References hann(), and pi.

Referenced by hann().

◆ blackman()

ITPP_EXPORT vec itpp::blackman ( int n)

Blackman window.

The n size Blackman window is a vector \(w\) where the \(i\)th component is

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

Definition at line 77 of file window.cpp.

References blackman(), and pi.

Referenced by blackman().

◆ triang()

ITPP_EXPORT vec itpp::triang ( int n)

Triangular window.

The n size triangle window is a vector \(w\) where the \(i\)th component is

\[w_i = w_{n-i-1} = \frac{2(i+1)}{n+1} \]

for n odd and for n even

\[w_i = w_{n-i-1} = \frac{2i+1}{n} \]

Definition at line 87 of file window.cpp.

References triang().

Referenced by triang().

◆ sqrt_win()

ITPP_EXPORT vec itpp::sqrt_win ( int n)

Square root window.

The square-root of the Triangle window. sqrt_win(n) = sqrt(triang(n))

Definition at line 103 of file window.cpp.

References sqrt_win().

Referenced by sqrt_win().

◆ chebwin()

ITPP_EXPORT vec itpp::chebwin ( int n,
double at )

Dolph-Chebyshev window.

The length n Dolph-Chebyshev window is a vector \(w\) whose \(i\)th transform component is given by

\[W[k] = \frac{T_M\left(\beta \cos\left(\frac{\pi k}{M}\right) \right)}{T_M(\beta)},k = 0, 1, 2, \ldots, M - 1 \]

where T_n(x) is the order n Chebyshev polynomial of the first kind.

Parameters
nlength of the Doplh-Chebyshev window
atattenutation of side lobe (in dB)
Returns
symmetric length n Doplh-Chebyshev window
Author
Kumar Appaiah and Adam Piatyszek (code review)

Definition at line 119 of file window.cpp.

References acosh(), cheb(), chebwin(), concat(), cos(), elem_mult(), ifft_real(), is_even(), it_assert, linspace(), pi, pow10(), reverse(), itpp::Vec< Num_T >::right(), sin(), and to_cvec().

Referenced by chebwin().