Signal Processing Toolbox Previous page   Next Page
sawtooth

Sawtooth or triangle wave

Syntax

Description

sawtooth(t) generates a sawtooth wave with period 2pi 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 2pi and to increase linearly with time with a slope of 1/pi at all other times.

sawtooth(t,width) generates a modified triangle wave where width, a scalar parameter between 0 and 1, determines the point between 0 and 2pi at which the maximum occurs. The function increases from -1 to 1 on the interval 0 to 2pi*width, then decreases linearly from 1 to -1 on the interval 2pi*width to 2pi. Thus a parameter of 0.5 specifies a standard triangle wave, symmetric about time instant pi 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


Previous page  rootmusic schurrc Next page

© 1994-2005 The MathWorks, Inc.