Engee documentation

flattopwin

A weighted window with a flat top.

Library

EngeeDSP

Syntax

Function call

  • w = flattopwin(L) — returns L-a dotted symmetrical window with a flat top.

  • w = flattopwin(L,sflag) — returns L-a dotted symmetrical window with a flat top, using the window selection specified by the argument sflag.

  • w = flattopwin(___,typeName) — indicates the possibility of returning the window w with single or double precision.

Arguments

Input arguments

# L — window length

+ a positive integer

Details

The window length, set as a positive integer.

If you ask L as a non-integer number, 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

The 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 flattopwin 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

# typeName — type of output data

+ Float64 (by default) | Float32

Details

The type of output data (class) specified in one of the following ways:

  • Float64 — use this value to return the output data. w with double precision.

  • Float32 — use this value to return the output data. w with single precision.

Типы данных

DataType

Output arguments

# w — a window with a flat top

+ column vector

Details

A flat-topped window returned as a column vector.

Algorithms

Flat-topped windows are the sum of cosines. The coefficients of a flat-top window are calculated using the following formula:

where . The coefficient values are shown in the table below.

Ratio Meaning

0.21557895

0.41663158

0.277263158

0.083578947

0.006947368

Flat-topped windows have very low ripple in the bandwidth ( dB) and are used mainly for calibration. Their bandwidth is approximately in 2.5 It’s twice as wide as Hannah’s window.

Literature

  1. D’Antona, Gabriele, and A. Ferrero. Digital Signal Processing for Measurement Systems. New York: Springer Media, 2006, pp. 70–72.

  2. Gade, Svend, and Henrik Herlufsen. «Use of Weighting Functions in DFT/FFT Analysis (Part I).» Windows to FFT Analysis (Part I): Brüel & Kjær Technical Review. Vol. x, Number 3, 1987, pp. 1–28.