Engee documentation

hamming

Hamming window.

Library

EngeeDSP

Syntax

Function call

  • w = hamming(L) — returns L-point symmetric Hamming window.

  • w = hamming(L,sflag) — returns the Hamming window using the window selection specified by the argument sflag.

Arguments

Input arguments

# L — window length

+ positive integer

Details

The window length specified as a positive integer.

If you set L as a non-integer, the function will round it to the nearest integer value.
Типы данных

Float32, Float64, Int8, Int16, Int32, Int64, UInt8, UInt16, UInt32, UInt64

# sflag — window selection

+ "symmetric" (by default) | "periodic"

Details

Window selection method, set as follows:

  • "symmetric" — use this value when using windows to design filters;

  • "periodic" — Use this value when using windows for spectral analysis. When selecting a value "periodic", function hamming calculates the window length L + 1 and returns the first L points. The missing endpoint is the beginning of the next period of periodic expansion of the sequence. Therefore, the sequence satisfies the assumption of the periodicity of the discrete Fourier transform.

Типы данных

String

Output arguments

# w — Hamming window

+ column vector

Details

The Hamming window returned as a column vector.

Algorithms

The following equation generates the Hamming window coefficients:

Window length .

Literature

  1. Oppenheim, Alan V., Ronald W. Schafer, and John R. Buck. Discrete-Time Signal Processing. Upper Saddle River, NJ: Prentice Hall, 1999.