| Signal Processing Toolbox | ![]() |
Generate a sawtooth or triangle wave
Syntax
Description
generates a sawtooth wave with period 2sawtooth(t)
for the elements of time vector t. sawtooth(t) is similar to sin(t), but creates a sawtooth wave with peaks of -1 and 1 instead of a sine wave. The sawtooth wave is defined to be -1 at multiples of 2
and to increase linearly with time with a slope of 1/
at all other times.
generates a modified triangle wave where sawtooth(t,width)
width, a scalar parameter between 0 and 1, determines the point between 0 and 2
at which the maximum occurs. The function increases from -1 to 1 on the interval 0 to 2
*width, then decreases linearly from 1 to -1 on the interval 2
*width to 2
. Thus a parameter of 0.5 specifies a standard triangle wave, symmetric about time instant
with peak-to-peak amplitude of 1. sawtooth(t,1) is equivalent to sawtooth(t).
See Also
chirp, cos, diric, gauspuls, pulstran, rectpuls, sin, sinc, square, tripuls
| rootmusic | schurrc | ![]() |