Engee documentation

hann

The window of Hannah (Henning).

Library

EngeeDSP

Syntax

Function call

  • w = hann(L) — returns L-point symmetrical window Hannah.

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

  • w = hann(___,typeName) — indicates whether the window can be returned w with single or double precision.

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.
Data types

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 hann 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.

Data types

String

# typeName — type of output data

+ "Float64" (by default) | "Float32"

Details

The type of output data (class) specified as one of the following options:

  • "Float64" — use this value to make the function return an output argument w with double precision.

  • "Float32" — use this value to make the function return an output argument w with single precision.

Data types

String

Output arguments

# w — Hannah’s window

+ column vector

Details

The Hanna window returned as a column vector.

Algorithms

The following equation generates the coefficients of the Hanna window:

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.