This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English version of the page.

Note: This page has been translated by MathWorks. Click here to see
To view all translated materials including this page, select Country from the country navigator on the bottom of this page.


Triangular window


w = triang(L)


w = triang(L) returns an L-point triangular window in the column vector, w.

See Algorithms for the equations that define the triangular window. The triangular window is very similar to a Bartlett window. The Bartlett window always ends with zeros at samples 1 and L, while the triangular window is nonzero at those points. For L odd, the center L-2 points of triang(L-2) are equivalent to bartlett(L).


collapse all

Create a 200-point triangular window. Display the result using wvtool.

L = 200;
w = triang(L);


The coefficients of a triangular window are the following.

For L odd:


For L even:



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

Extended Capabilities

Introduced before R2006a