Functions |
| DEFUN (abs, args,,"-*- texinfo -*-\n\
@deftypefn {Mapping Function} {} abs (@var{z})\n\
Compute the magnitude of @var{z}, defined as\n\
@tex\n\
$|z| = \\sqrt{x^2 + y^2}$.\n\
@end tex\n\
@ifnottex\n\
|@var{z}| = @code{sqrt (x^2 + y^2)}.\n\
@end ifnottex\n\
\n\
For example:\n\
\n\
@example\n\
@group\n\
abs (3 + 4i)\n\
@result{} 5\n\
@end group\n\
@end example\n\
@end deftypefn") |
| DEFUN (acos, args,,"-*- texinfo -*-\n\
@deftypefn {Mapping Function} {} acos (@var{x})\n\
Compute the inverse cosine in radians for each element of @var{x}.\n\
@seealso{cos, acosd}\n\
@end deftypefn") |
| DEFUN (acosh, args,,"-*- texinfo -*-\n\
@deftypefn {Mapping Function} {} acosh (@var{x})\n\
Compute the inverse hyperbolic cosine for each element of @var{x}.\n\
@seealso{cosh}\n\
@end deftypefn") |
| DEFUN (angle, args,,"-*- texinfo -*-\n\
@deftypefn {Mapping Function} {} angle (@var{z})\n\
See arg.\n\
@end deftypefn") |
| DEFUN (arg, args,,"-*- texinfo -*-\n\
@deftypefn {Mapping Function} {} arg (@var{z})\n\
@deftypefnx {Mapping Function} {} angle (@var{z})\n\
Compute the argument of @var{z}, defined as,\n\
@tex\n\
$\\theta = atan2 (y, x),$\n\
@end tex\n\
@ifnottex\n\
@var{theta} = @code{atan2 (@var{y}, @var{x})},\n\
@end ifnottex\n\
in radians.\n\
\n\
For example:\n\
\n\
@example\n\
@group\n\
arg (3 + 4i)\n\
@result{} 0.92730\n\
@end group\n\
@end example\n\
@end deftypefn") |
| DEFUN (asin, args,,"-*- texinfo -*-\n\
@deftypefn {Mapping Function} {} asin (@var{x})\n\
Compute the inverse sine in radians for each element of @var{x}.\n\
@seealso{sin, asind}\n\
@end deftypefn") |
| DEFUN (asinh, args,,"-*- texinfo -*-\n\
@deftypefn {Mapping Function} {} asinh (@var{x})\n\
Compute the inverse hyperbolic sine for each element of @var{x}.\n\
@seealso{sinh}\n\
@end deftypefn") |
| DEFUN (atan, args,,"-*- texinfo -*-\n\
@deftypefn {Mapping Function} {} atan (@var{x})\n\
Compute the inverse tangent in radians for each element of @var{x}.\n\
@seealso{tan, atand}\n\
@end deftypefn") |
| DEFUN (atanh, args,,"-*- texinfo -*-\n\
@deftypefn {Mapping Function} {} atanh (@var{x})\n\
Compute the inverse hyperbolic tangent for each element of @var{x}.\n\
@seealso{tanh}\n\
@end deftypefn") |
| DEFUN (cbrt, args,,"-*- texinfo -*-\n\
@deftypefn {Mapping Function} {} cbrt (@var{x})\n\
Compute the real cube root of each element of @var{x}.\n\
Unlike @code{@var{x}^(1/3)}, the result will be negative if @var{x} is\n\
negative.\n\
@seealso{nthroot}\n\
@end deftypefn") |
| DEFUN (ceil, args,,"-*- texinfo -*-\n\
@deftypefn {Mapping Function} {} ceil (@var{x})\n\
Return the smallest integer not less than @var{x}. This is equivalent to\n\
rounding towards positive infinity. If @var{x} is\n\
complex, return @code{ceil (real (@var{x})) + ceil (imag (@var{x})) * I}.\n\
\n\
@example\n\
@group\n\
ceil ([-2.7, 2.7])\n\
@result{} -2 3\n\
@end group\n\
@end example\n\
@seealso{floor, round, fix}\n\
@end deftypefn") |
| DEFUN (conj, args,,"-*- texinfo -*-\n\
@deftypefn {Mapping Function} {} conj (@var{z})\n\
Return the complex conjugate of @var{z}, defined as\n\
@tex\n\
$\\bar{z} = x - iy$.\n\
@end tex\n\
@ifnottex\n\
@code{conj (@var{z})} = @var{x} - @var{i}@var{y}.\n\
@end ifnottex\n\
@seealso{real, imag}\n\
@end deftypefn") |
| DEFUN (cos, args,,"-*- texinfo -*-\n\
@deftypefn {Mapping Function} {} cos (@var{x})\n\
Compute the cosine for each element of @var{x} in radians.\n\
@seealso{acos, cosd, cosh}\n\
@end deftypefn") |
| DEFUN (cosh, args,,"-*- texinfo -*-\n\
@deftypefn {Mapping Function} {} cosh (@var{x})\n\
Compute the hyperbolic cosine for each element of @var{x}.\n\
@seealso{acosh, sinh, tanh}\n\
@end deftypefn") |
| DEFUN (erf, args,,"-*- texinfo -*-\n\
@deftypefn {Mapping Function} {} erf (@var{z})\n\
Compute the error function,\n\
@tex\n\
$$\n\
{\\rm erf} (z) = {2 \\over \\sqrt{\\pi}}\\int_0^z e^{-t^2} dt\n\
$$\n\
@end tex\n\
@ifnottex\n\
\n\
@example\n\
@group\n\
z\n\
/\n\
erf (z) = (2/sqrt (pi)) | e^(-t^2) dt\n\
/\n\
t=0\n\
@end group\n\
@end example\n\
\n\
@end ifnottex\n\
@seealso{erfc, erfcx, erfinv}\n\
@end deftypefn") |
| DEFUN (erfinv, args,,"-*- texinfo -*-\n\
@deftypefn {Mapping Function} {} erfinv (@var{x})\n\
Compute the inverse error function, i.e., @var{y} such that\n\
\n\
@example\n\
erf(@var{y}) == @var{x}\n\
@end example\n\
@seealso{erf, erfc, erfcx}\n\
@end deftypefn") |
| DEFUN (erfc, args,,"-*- texinfo -*-\n\
@deftypefn {Mapping Function} {} erfc (@var{z})\n\
Compute the complementary error function,\n\
@tex\n\
$1 - {\\rm erf} (z)$.\n\
@end tex\n\
@ifnottex\n\
@code{1 - erf (@var{z})}.\n\
@end ifnottex\n\
@seealso{erfcx, erf, erfinv}\n\
@end deftypefn") |
| DEFUN (erfcx, args,,"-*- texinfo -*-\n\
@deftypefn {Mapping Function} {} erfcx (@var{z})\n\
Compute the scaled complementary error function,\n\
@tex\n\
$z^2 (1 - {\\rm erf} (z))$.\n\
@end tex\n\
@ifnottex\n\
@code{z^2*(1 - erf (@var{z}))}.\n\
@end ifnottex\n\
@seealso{erfc, erf, erfinv}\n\
@end deftypefn") |
| DEFUN (exp, args,,"-*- texinfo -*-\n\
@deftypefn {Mapping Function} {} exp (@var{x})\n\
Compute\n\
@tex\n\
$e^{x}$\n\
@end tex\n\
@ifnottex\n\
@code{e^x}\n\
@end ifnottex\n\
for each element of @var{x}. To compute the matrix\n\
exponential, see @ref{Linear Algebra}.\n\
@seealso{log}\n\
@end deftypefn") |
| DEFUN (expm1, args,,"-*- texinfo -*-\n\
@deftypefn {Mapping Function} {} expm1 (@var{x})\n\
Compute\n\
@tex\n\
$ e^{x} - 1 $\n\
@end tex\n\
@ifnottex\n\
@code{exp (@var{x}) - 1}\n\
@end ifnottex\n\
accurately in the neighborhood of zero.\n\
@seealso{exp}\n\
@end deftypefn") |
| DEFUN (isfinite, args,,"-*- texinfo -*-\n\
@deftypefn {Mapping Function} {} isfinite (@var{x})\n\
@deftypefnx {Mapping Function} {} finite (@var{x})\n\
Return a logical array which is true where the elements of @var{x} are\n\
finite values and false where they are not.\n\
For example:\n\
\n\
@example\n\
@group\n\
finite ([13, Inf, NA, NaN])\n\
@result{} [ 1, 0, 0, 0 ]\n\
@end group\n\
@end example\n\
@seealso{isinf, isnan, isna}\n\
@end deftypefn") |
| DEFUN (fix, args,,"-*- texinfo -*-\n\
@deftypefn {Mapping Function} {} fix (@var{x})\n\
Truncate fractional portion of @var{x} and return the integer portion. This\n\
is equivalent to rounding towards zero. If @var{x} is complex, return\n\
@code{fix (real (@var{x})) + fix (imag (@var{x})) * I}.\n\
\n\
@example\n\
@group\n\
fix ([-2.7, 2.7])\n\
@result{} -2 2\n\
@end group\n\
@end example\n\
@seealso{ceil, floor, round}\n\
@end deftypefn") |
| DEFUN (floor, args,,"-*- texinfo -*-\n\
@deftypefn {Mapping Function} {} floor (@var{x})\n\
Return the largest integer not greater than @var{x}. This is equivalent to\n\
rounding towards negative infinity. If @var{x} is\n\
complex, return @code{floor (real (@var{x})) + floor (imag (@var{x})) * I}.\n\
\n\
@example\n\
@group\n\
floor ([-2.7, 2.7])\n\
@result{} -3 2\n\
@end group\n\
@end example\n\
@seealso{ceil, round, fix}\n\
@end deftypefn") |
| DEFUN (gamma, args,,"-*- texinfo -*-\n\
@deftypefn {Mapping Function} {} gamma (@var{z})\n\
Compute the Gamma function,\n\
@tex\n\
$$\n\
\\Gamma (z) = \\int_0^\\infty t^{z-1} e^{-t} dt.\n\
$$\n\
@end tex\n\
@ifnottex\n\
\n\
@example\n\
@group\n\
infinity\n\
/\n\
gamma (z) = | t^(z-1) exp (-t) dt.\n\
/\n\
t=0\n\
@end group\n\
@end example\n\
\n\
@end ifnottex\n\
@seealso{gammainc, lgamma}\n\
@end deftypefn") |
| DEFUN (imag, args,,"-*- texinfo -*-\n\
@deftypefn {Mapping Function} {} imag (@var{z})\n\
Return the imaginary part of @var{z} as a real number.\n\
@seealso{real, conj}\n\
@end deftypefn") |
| DEFUNX ("isalnum", Fisalnum, args,,"-*- texinfo -*-\n\
@deftypefn {Mapping Function} {} isalnum (@var{s})\n\
Return a logical array which is true where the elements of @var{s} are\n\
letters or digits and false where they are not. This is equivalent to\n\
(@code{isalpha (@var{s}) | isdigit (@var{s})}).\n\
@seealso{isalpha, isdigit, ispunct, isspace, iscntrl}\n\
@end deftypefn") |
| DEFUNX ("isalpha", Fisalpha, args,,"-*- texinfo -*-\n\
@deftypefn {Mapping Function} {} isalpha (@var{s})\n\
Return a logical array which is true where the elements of @var{s} are\n\
letters and false where they are not. This is equivalent to\n\
(@code{islower (@var{s}) | isupper (@var{s})}).\n\
@seealso{isdigit, ispunct, isspace, iscntrl, isalnum, islower, isupper}\n\
@end deftypefn") |
| DEFUNX ("isascii", Fisascii, args,,"-*- texinfo -*-\n\
@deftypefn {Mapping Function} {} isascii (@var{s})\n\
Return a logical array which is true where the elements of @var{s} are\n\
ASCII characters (in the range 0 to 127 decimal) and false where they are\n\
not.\n\
@end deftypefn") |
| DEFUNX ("iscntrl", Fiscntrl, args,,"-*- texinfo -*-\n\
@deftypefn {Mapping Function} {} iscntrl (@var{s})\n\
Return a logical array which is true where the elements of @var{s} are\n\
control characters and false where they are not.\n\
@seealso{ispunct, isspace, isalpha, isdigit}\n\
@end deftypefn") |
| DEFUNX ("isdigit", Fisdigit, args,,"-*- texinfo -*-\n\
@deftypefn {Mapping Function} {} isdigit (@var{s})\n\
Return a logical array which is true where the elements of @var{s} are\n\
decimal digits (0-9) and false where they are not.\n\
@seealso{isxdigit, isalpha, isletter, ispunct, isspace, iscntrl}\n\
@end deftypefn") |
| DEFUN (isinf, args,,"-*- texinfo -*-\n\
@deftypefn {Mapping Function} {} isinf (@var{x})\n\
Return a logical array which is true where the elements of @var{x} are\n\
are infinite and false where they are not.\n\
For example:\n\
\n\
@example\n\
@group\n\
isinf ([13, Inf, NA, NaN])\n\
@result{} [ 0, 1, 0, 0 ]\n\
@end group\n\
@end example\n\
@seealso{isfinite, isnan, isna}\n\
@end deftypefn") |
| DEFUNX ("isgraph", Fisgraph, args,,"-*- texinfo -*-\n\
@deftypefn {Mapping Function} {} isgraph (@var{s})\n\
Return a logical array which is true where the elements of @var{s} are\n\
printable characters (but not the space character) and false where they are\n\
not.\n\
@seealso{isprint}\n\
@end deftypefn") |
| DEFUNX ("islower", Fislower, args,,"-*- texinfo -*-\n\
@deftypefn {Mapping Function} {} islower (@var{s})\n\
Return a logical array which is true where the elements of @var{s} are\n\
lower case letters and false where they are not.\n\
@seealso{isupper, isalpha, isletter, isalnum}\n\
@end deftypefn") |
| DEFUN (isna, args,,"-*- texinfo -*-\n\
@deftypefn {Mapping Function} {} isna (@var{x})\n\
Return a logical array which is true where the elements of @var{x} are\n\
NA (missing) values and false where they are not.\n\
For example:\n\
\n\
@example\n\
@group\n\
isna ([13, Inf, NA, NaN])\n\
@result{} [ 0, 0, 1, 0 ]\n\
@end group\n\
@end example\n\
@seealso{isnan, isinf, isfinite}\n\
@end deftypefn") |
| DEFUN (isnan, args,,"-*- texinfo -*-\n\
@deftypefn {Mapping Function} {} isnan (@var{x})\n\
Return a logical array which is true where the elements of @var{x} are\n\
NaN values and false where they are not.\n\
NA values are also considered NaN values. For example:\n\
\n\
@example\n\
@group\n\
isnan ([13, Inf, NA, NaN])\n\
@result{} [ 0, 0, 1, 1 ]\n\
@end group\n\
@end example\n\
@seealso{isna, isinf, isfinite}\n\
@end deftypefn") |
| DEFUNX ("isprint", Fisprint, args,,"-*- texinfo -*-\n\
@deftypefn {Mapping Function} {} isprint (@var{s})\n\
Return a logical array which is true where the elements of @var{s} are\n\
printable characters (including the space character) and false where they\n\
are not.\n\
@seealso{isgraph}\n\
@end deftypefn") |
| DEFUNX ("ispunct", Fispunct, args,,"-*- texinfo -*-\n\
@deftypefn {Mapping Function} {} ispunct (@var{s})\n\
Return a logical array which is true where the elements of @var{s} are\n\
punctuation characters and false where they are not.\n\
@seealso{isalpha, isdigit, isspace, iscntrl}\n\
@end deftypefn") |
| DEFUNX ("isspace", Fisspace, args,,"-*- texinfo -*-\n\
@deftypefn {Mapping Function} {} isspace (@var{s})\n\
Return a logical array which is true where the elements of @var{s} are\n\
whitespace characters (space, formfeed, newline, carriage return, tab, and\n\
vertical tab) and false where they are not.\n\
@seealso{iscntrl, ispunct, isalpha, isdigit}\n\
@end deftypefn") |
| DEFUNX ("isupper", Fisupper, args,,"-*- texinfo -*-\n\
@deftypefn {Mapping Function} {} isupper (@var{s})\n\
Return a logical array which is true where the elements of @var{s} are\n\
upper case letters and false where they are not.\n\
@seealso{islower, isalpha, isletter, isalnum}\n\
@end deftypefn") |
| DEFUNX ("isxdigit", Fisxdigit, args,,"-*- texinfo -*-\n\
@deftypefn {Mapping Function} {} isxdigit (@var{s})\n\
Return a logical array which is true where the elements of @var{s} are\n\
hexadecimal digits (0-9 and @nospell{a-fA-F}).\n\
@seealso{isdigit}\n\
@end deftypefn") |
| DEFUN (lgamma, args,,"-*- texinfo -*-\n\
@deftypefn {Mapping Function} {} lgamma (@var{x})\n\
@deftypefnx {Mapping Function} {} gammaln (@var{x})\n\
Return the natural logarithm of the gamma function of @var{x}.\n\
@seealso{gamma, gammainc}\n\
@end deftypefn") |
| DEFUN (log, args,,"-*- texinfo -*-\n\
@deftypefn {Mapping Function} {} log (@var{x})\n\
Compute the natural logarithm,\n\
@tex\n\
$\\ln{(x)},$\n\
@end tex\n\
@ifnottex\n\
@code{ln (@var{x})},\n\
@end ifnottex\n\
for each element of @var{x}. To compute the\n\
matrix logarithm, see @ref{Linear Algebra}.\n\
@seealso{exp, log1p, log2, log10, logspace}\n\
@end deftypefn") |
| DEFUN (log10, args,,"-*- texinfo -*-\n\
@deftypefn {Mapping Function} {} log10 (@var{x})\n\
Compute the base-10 logarithm of each element of @var{x}.\n\
@seealso{log, log2, logspace, exp}\n\
@end deftypefn") |
| DEFUN (log1p, args,,"-*- texinfo -*-\n\
@deftypefn {Mapping Function} {} log1p (@var{x})\n\
Compute\n\
@tex\n\
$\\ln{(1 + x)}$\n\
@end tex\n\
@ifnottex\n\
@code{log (1 + @var{x})}\n\
@end ifnottex\n\
accurately in the neighborhood of zero.\n\
@seealso{log, exp, expm1}\n\
@end deftypefn") |
| DEFUN (real, args,,"-*- texinfo -*-\n\
@deftypefn {Mapping Function} {} real (@var{z})\n\
Return the real part of @var{z}.\n\
@seealso{imag, conj}\n\
@end deftypefn") |
| DEFUN (round, args,,"-*- texinfo -*-\n\
@deftypefn {Mapping Function} {} round (@var{x})\n\
Return the integer nearest to @var{x}. If @var{x} is complex, return\n\
@code{round (real (@var{x})) + round (imag (@var{x})) * I}.\n\
\n\
@example\n\
@group\n\
round ([-2.7, 2.7])\n\
@result{} -3 3\n\
@end group\n\
@end example\n\
@seealso{ceil, floor, fix}\n\
@end deftypefn") |
| DEFUN (roundb, args,,"-*- texinfo -*-\n\
@deftypefn {Mapping Function} {} roundb (@var{x})\n\
Return the integer nearest to @var{x}. If there are two nearest\n\
integers, return the even one (banker's rounding). If @var{x} is complex,\n\
return @code{roundb (real (@var{x})) + roundb (imag (@var{x})) * I}.\n\
@seealso{round}\n\
@end deftypefn") |
| DEFUN (sign, args,,"-*- texinfo -*-\n\
@deftypefn {Mapping Function} {} sign (@var{x})\n\
Compute the @dfn{signum} function, which is defined as\n\
@tex\n\
$$\n\
{\\rm sign} (@var{x}) = \\cases{1,&$x>0$;\\cr 0,&$x=0$;\\cr -1,&$x<0$.\\cr}\n\
$$\n\
@end tex\n\
@ifnottex\n\
\n\
@example\n\
@group\n\
-1, x < 0;\n\
sign (x) = 0, x = 0;\n\
1, x > 0.\n\
@end group\n\
@end example\n\
\n\
@end ifnottex\n\
\n\
For complex arguments, @code{sign} returns @code{x ./ abs (@var{x})}.\n\
@end deftypefn") |
| DEFUN (sin, args,,"-*- texinfo -*-\n\
@deftypefn {Mapping Function} {} sin (@var{x})\n\
Compute the sine for each element of @var{x} in radians.\n\
@seealso{asin, sind, sinh}\n\
@end deftypefn") |
| DEFUN (sinh, args,,"-*- texinfo -*-\n\
@deftypefn {Mapping Function} {} sinh (@var{x})\n\
Compute the hyperbolic sine for each element of @var{x}.\n\
@seealso{asinh, cosh, tanh}\n\
@end deftypefn") |
| DEFUN (sqrt, args,,"-*- texinfo -*-\n\
@deftypefn {Mapping Function} {} sqrt (@var{x})\n\
Compute the square root of each element of @var{x}. If @var{x} is negative,\n\
a complex result is returned. To compute the matrix square root, see\n\
@ref{Linear Algebra}.\n\
@seealso{realsqrt, nthroot}\n\
@end deftypefn") |
| DEFUN (tan, args,,"-*- texinfo -*-\n\
@deftypefn {Mapping Function} {} tan (@var{z})\n\
Compute the tangent for each element of @var{x} in radians.\n\
@seealso{atan, tand, tanh}\n\
@end deftypefn") |
| DEFUN (tanh, args,,"-*- texinfo -*-\n\
@deftypefn {Mapping Function} {} tanh (@var{x})\n\
Compute hyperbolic tangent for each element of @var{x}.\n\
@seealso{atanh, sinh, cosh}\n\
@end deftypefn") |
| DEFUNX ("toascii", Ftoascii, args,,"-*- texinfo -*-\n\
@deftypefn {Mapping Function} {} toascii (@var{s})\n\
Return ASCII representation of @var{s} in a matrix. For example:\n\
\n\
@example\n\
@group\n\
toascii (\"ASCII\")\n\
@result{} [ 65, 83, 67, 73, 73 ]\n\
@end group\n\
\n\
@end example\n\
@seealso{char}\n\
@end deftypefn") |
| DEFUNX ("tolower", Ftolower, args,,"-*- texinfo -*-\n\
@deftypefn {Mapping Function} {} tolower (@var{s})\n\
@deftypefnx {Mapping Function} {} lower (@var{s})\n\
Return a copy of the string or cell string @var{s}, with each upper-case\n\
character replaced by the corresponding lower-case one; non-alphabetic\n\
characters are left unchanged. For example:\n\
\n\
@example\n\
@group\n\
tolower (\"MiXeD cAsE 123\")\n\
@result{} \"mixed case 123\"\n\
@end group\n\
@end example\n\
@seealso{toupper}\n\
@end deftypefn") |
| DEFALIAS (lower, tolower) |
| DEFUNX ("toupper", Ftoupper, args,,"-*- texinfo -*-\n\
@deftypefn {Built-in Function} {} toupper (@var{s})\n\
@deftypefnx {Built-in Function} {} upper (@var{s})\n\
Return a copy of the string or cell string @var{s}, with each lower-case\n\
character replaced by the corresponding upper-case one; non-alphabetic\n\
characters are left unchanged. For example:\n\
\n\
@example\n\
@group\n\
toupper (\"MiXeD cAsE 123\")\n\
@result{} \"MIXED CASE 123\"\n\
@end group\n\
@end example\n\
@seealso{tolower}\n\
@end deftypefn") |
| DEFALIAS (upper, toupper) |
| DEFALIAS (gammaln, lgamma) |
| DEFALIAS (finite, isfinite) |