| Signal Processing Toolbox™ | ![]() |
w = bartlett(L)
w = bartlett(L) returns an L-point Bartlett window in the column vector w, where L must be a positive integer. The coefficients of a Bartlett window are computed as follows:

The window length
.
The Bartlett window is very similar to a triangular window as returned by the triang function. The Bartlett window always ends with zeros at samples 1 and n, however, while the triangular window is nonzero at those points. For L odd, the center L-2 points of bartlett(L) are equivalent to triang(L-2).
Note If you specify a one-point window (set L=1), the value 1 is returned. |
Create a 64-point Bartlett window and display the result using WVTool:
L=64; wvtool(bartlett(L))

[1] Oppenheim, A.V., and R.W. Schafer. Discrete-Time Signal Processing. Upper Saddle River, NJ: Prentice-Hall, 1999, pp. 468-471.
barthannwin, blackmanharris, bohmanwin, nuttallwin, parzenwin, rectwin, triang, window, wintool, wvtool
![]() | barthannwin | besselap | ![]() |

Includes the most popular MATLAB recorded presentations with Q&A sessions led by MATLAB experts.
| © 1984-2009- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |