Previous Up Next

21.1.3  Triangle function

The triangle function is defined by

  Λ(x)=
⎧
⎨
⎩
    1−|x|,|x|<1,
    0,otherwise.

This is equal to the convolution of rectangle function with itself (see Section 21.1.2).

The tri command computes the triangle function.

Example

tri(x-1)
     
⎛
⎝
−x+1+1⎞
⎠
⎛
⎝
θ⎛
⎝
x−1⎞
⎠
−θ⎛
⎝
x−1−1⎞
⎠
⎞
⎠
+⎛
⎝
1+x−1⎞
⎠
⎛
⎝
θ⎛
⎝
−x+1⎞
⎠
−θ⎛
⎝
−x+1−1⎞
⎠
⎞
⎠
          

Previous Up Next