window

Parameterless window creation (rectangular, Hann, Hamming, triangular or Blackman)

Namespace: dsp::filter

Prototype

Vecf window(cstring type, int n, bool symetrical=true)

Parameters

typeWindow choice: "re" (rectangular), "hn" (Hann), "hm" (Hamming), "tr" (triangular), "bm" (Blackman).
nNumber of points.
symetricalIf true, realization of window symetrical around its center point (which should be done for the FIR filter design), otherwise realization of a periodical window (which is better for spectral analysis applications).

Returns

Column vector with the window coefficients (dimension of vector is n)

Description

This function will create a simple window, defined without parameter (apart from its dimension and whether it should be symetrical or not).

Example: creation of a Von Hann window (also called Hanning)


  soit x = fenĂȘtre("hn", 32);

  Figure f;
  f.plot(x, "b-o");

Hann Window

See also

window_kaiser(), window_chebychev()