Home > freetb4matlab > signal > sawtooth.m

sawtooth

PURPOSE ^

% Generates a sawtooth wave of period @code{2 * pi} with limits @code{+1/-1}

SYNOPSIS ^

function y = sawtooth (t,width)

DESCRIPTION ^

% -*- texinfo -*-
% @deftypefn {Function File} {[@var{y}] =} sawtooth(@var{t})
% @deftypefnx {Function File} {[@var{y}] =} sawtooth(@var{t},@var{width})
% Generates a sawtooth wave of period @code{2 * pi} with limits @code{+1/-1}
%  for the elements of @var{t}.
%
% @var{width} is a real number between @code{0} and @code{1} which specifies
% the point between @code{0} and @code{2 * pi} where the maximum is. The
% function increases linearly from @code{-1} to @code{1} in  @code{[0, 2 * 
% pi * @var{width}]} interval, and decreases linearly from @code{1} to 
% @code{-1} in the interval @code{[2 * pi * @var{width}, 2 * pi]}.
%
% If @var{width} is 0.5, the function generates a standard triangular wave.
%
% If @var{width} is not specified, it takes a value of 1, which is a standard
% sawtooth function.
% @end deftypefn

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:
Generated on Fri 22-May-2009 15:13:00 by m2html © 2003