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
You have a modified version of this example. Do you want to open this example with your edits?