Create a 64-point Bartlett window. Display the result using
L = 64; bw = bartlett(L); wvtool(bw)
L — Window length
Window length, specified as a positive integer.
w — Bartlett window
Bartlett window, returned as a column vector.
The following equation generates the coefficients of a Bartlett window:
The window length .
The Bartlett window is very similar to a triangular window as returned by the
triang function. However, the Bartlett window always has zeros at the first and
last samples, while the triangular window is nonzero at those points. For odd values of
L, the center
L-2 points of
bartlett(L) are equivalent to
If you specify a one-point window (
L = 1), the
1 is returned.
 Oppenheim, Alan V., Ronald W. Schafer, and John R. Buck. Discrete-Time Signal Processing. Upper Saddle River, NJ: Prentice Hall, 1999, pp.