Home > freetb4matlab > general > mod.m

mod

PURPOSE ^

% Compute the modulo of @var{x} and @var{y}. Conceptually this is given by

SYNOPSIS ^

function r = mod (x, y)

DESCRIPTION ^

% -*- texinfo -*-
% @deftypefn {Mapping Function} {} mod (@var{x}, @var{y})
% Compute the modulo of @var{x} and @var{y}.  Conceptually this is given by
%
% @example
% x - y .* floor (x ./ y)
% @end example
%
% and is written such that the correct modulus is returned for
% integer types.  This function handles negative values correctly.  That
% is, @code{mod (-1, 3)} is 2, not -1, as @code{rem (-1, 3)} returns.
% @code{mod (@var{x}, 0)} returns @var{x}.
%
% An error results if the dimensions of the arguments do not agree, or if
% either of the arguments is complex.
% @seealso{rem, fmod}
% @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