Main Content


Modified Bartlett-Hann window


w = barthannwin(L)


w = barthannwin(L) returns an L-point modified Bartlett-Hann window in the column vector w. Like Bartlett, Hann, and Hamming windows, this window has a mainlobe at the origin and asymptotically decaying sidelobes on both sides. It is a linear combination of weighted Bartlett and Hann windows with near sidelobes lower than both Bartlett and Hann and with far sidelobes lower than both Bartlett and Hamming windows. The mainlobe width of the modified Bartlett-Hann window is not increased relative to either Bartlett or Hann window mainlobes.


The Hann window is also called the Hanning window.


collapse all

Create a 64-point Bartlett-Hann window. Display the result using wvtool.

L = 64;

Figure Window Visualization Tool contains 2 axes and other objects of type uimenu, uitoolbar, uipanel. Axes 1 with title Time domain contains an object of type line. Axes 2 with title Frequency domain contains an object of type line.


The equation for computing the coefficients of a Modified Bartlett-Hanning window is


where 0nN and the window length is L=N+1.


[1] Ha, Y. H., and J. A. Pearce. “A New Window and Comparison to Standard Windows.” IEEE® Transactions on Acoustics, Speech, and Signal Processing. Vol. 37, Number 2, 1999, pp. 298–301.

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

Extended Capabilities

C/C++ Code Generation
Generate C and C++ code using MATLAB® Coder™.

Introduced before R2006a