Signal Processing Toolbox | ![]() ![]() |
Generate a sawtooth or triangle wave.
Syntax
x=
sawtooth(t) x=
sawtooth(t,width)
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 |
Generate a swept-frequency cosine. |
cos |
Compute the cosine of vector/matrix elements (see the MATLAB documentation). |
diric |
Compute the Dirichlet or periodic sinc function. |
gauspuls |
Generate a Gaussian-modulated sinusoidal pulse. |
pulstran |
Generate a pulse train. |
rectpuls |
Generate a sampled aperiodic rectangle. |
sin |
Compute the sine of vector/matrix elements (see the MATLAB documentation). |
sinc |
Compute the sinc or sin(![]() ![]() |
square |
Generate a square wave. |
tripuls |
Generate a sampled aperiodic triangle. |
![]() | rootmusic | schurrc | ![]() |