DocumentationHelp Center
Triangular window
w = triang(L)
example
w = triang(L) returns an L-point triangular window.
w
L
collapse all
Create a 200-point triangular window. Display the result using wvtool.
wvtool
L = 200; w = triang(L); wvtool(w)
Window length, specified as a positive integer.
Data Types: single | double
single
double
Triangular window, returned as a column vector.
The coefficients of a triangular window are:
For L odd:
w(n)={2nL+11≤n≤L+122−2nL+1L+12+1≤n≤L
For L even:
w(n)={(2n−1)L1≤n≤L22−(2n−1)LL2+1≤n≤L
[1] Oppenheim, Alan V., Ronald W. Schafer, and John R. Buck. Discrete-Time Signal Processing. Upper Saddle River, NJ: Prentice Hall, 1999.
flattopwin
hamming
hann
A modified version of this example exists on your system. Do you want to open this version instead?
You clicked a link that corresponds to this MATLAB command:
Run the command by entering it in the MATLAB Command Window. Web browsers do not support MATLAB commands.
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list:
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Contact your local office