Documentation

flattopwin

Flat top weighted window

Syntax

w = flattopwin(L)
w = flattopwin(L,sflag)

Description

平顶windows have very low passband ripple (< 0.01 dB) and are used primarily for calibration purposes. Their bandwidth is approximately 2.5 times wider than a Hann window.

w = flattopwin(L)returns theL-point symmetric flat top window in column vectorw.

w = flattopwin(L,sflag)returns theL-point symmetric flat top window usingsflagwindow sampling, wheresflagis either'symmetric'or'periodic'. The'periodic'flag is useful for DFT/FFT purposes, such as in spectral analysis. The DFT/FFT contains an implicit periodic extension and the periodic flag enables a signal windowed with a periodic window to have perfect periodic extension. When'periodic'is specified,flattopwincomputes a lengthL+1window and returns the firstLpoints. When using windows for filter design, the'symmetric'flag should be used.

Examples

collapse all

Create a 64-point symmetric flat top window. View the result usingwvtool.

N = 64; w = flattopwin(N); wvtool(w)

Algorithms

平顶windows are summations of cosines. The coefficients of a flat top window are computed from the following equation:

w ( n ) = a 0 a 1 cos ( 2 π n N 1 ) + a 2 cos ( 4 π n N 1 ) a 3 cos ( 6 π n N 1 ) + a 4 cos ( 8 π n N 1 ) ,

where 0 n N 1 . The coefficient values are

Coefficient Value
a0 0.21557895
a1 0.41663158
a2 0.277263158
a3 0.083578947
a4 0.006947368

References

[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, No. 3, 1987, pp. 1–28.

Extended Capabilities

See Also

Apps

Functions

Introduced before R2006a

Was this topic helpful?