Defines |
#define | MAKE_INT_BRANCH(X) |
#define | MAKE_INT_BRANCH(X) |
#define | MAKE_INT_BRANCH(X) |
Functions |
template<> |
octave_value_list | do_minmax_red_op< boolNDArray > (const octave_value &arg, int nargout, int dim, bool ismin) |
| DEFUN_DLD (min, args, nargout,"-*- texinfo -*-\n\
@deftypefn {Loadable Function} {} min (@var{x})\n\
@deftypefnx {Loadable Function} {} min (@var{x}, @var{y})\n\
@deftypefnx {Loadable Function} {} min (@var{x}, @var{y}, @var{dim})\n\
@deftypefnx {Loadable Function} {[@var{w}, @var{iw}] =} min (@var{x})\n\
For a vector argument, return the minimum value. For a matrix\n\
argument, return the minimum value from each column, as a row\n\
vector, or over the dimension @var{dim} if defined. For two matrices\n\
(or a matrix and scalar), return the pair-wise minimum.\n\
Thus,\n\
\n\
@example\n\
min (min (@var{x}))\n\
@end example\n\
\n\
@noindent\n\
returns the smallest element of @var{x}, and\n\
\n\
@example\n\
@group\n\
min (2:5, pi)\n\
@result{} 2.0000 3.0000 3.1416 3.1416\n\
@end group\n\
@end example\n\
\n\
@noindent\n\
compares each element of the range @code{2:5} with @code{pi}, and\n\
returns a row vector of the minimum values.\n\
\n\
For complex arguments, the magnitude of the elements are used for\n\
comparison.\n\
\n\
If called with one input and two output arguments,\n\
@code{min} also returns the first index of the\n\
minimum value(s). Thus,\n\
\n\
@example\n\
@group\n\
[x, ix] = min ([1, 3, 0, 2, 0])\n\
@result{} x = 0\n\
ix = 3\n\
@end group\n\
@end example\n\
@seealso{max, cummin, cummax}\n\
@end deftypefn") |
| DEFUN_DLD (max, args, nargout,"-*- texinfo -*-\n\
@deftypefn {Loadable Function} {} max (@var{x})\n\
@deftypefnx {Loadable Function} {} max (@var{x}, @var{y})\n\
@deftypefnx {Loadable Function} {} max (@var{x}, @var{y}, @var{dim})\n\
@deftypefnx {Loadable Function} {[@var{w}, @var{iw}] =} max (@var{x})\n\
For a vector argument, return the maximum value. For a matrix\n\
argument, return the maximum value from each column, as a row\n\
vector, or over the dimension @var{dim} if defined. For two matrices\n\
(or a matrix and scalar), return the pair-wise maximum.\n\
Thus,\n\
\n\
@example\n\
max (max (@var{x}))\n\
@end example\n\
\n\
@noindent\n\
returns the largest element of the matrix @var{x}, and\n\
\n\
@example\n\
@group\n\
max (2:5, pi)\n\
@result{} 3.1416 3.1416 4.0000 5.0000\n\
@end group\n\
@end example\n\
\n\
@noindent\n\
compares each element of the range @code{2:5} with @code{pi}, and\n\
returns a row vector of the maximum values.\n\
\n\
For complex arguments, the magnitude of the elements are used for\n\
comparison.\n\
\n\
If called with one input and two output arguments,\n\
@code{max} also returns the first index of the\n\
maximum value(s). Thus,\n\
\n\
@example\n\
@group\n\
[x, ix] = max ([1, 3, 5, 2, 5])\n\
@result{} x = 5\n\
ix = 3\n\
@end group\n\
@end example\n\
@seealso{min, cummax, cummin}\n\
@end deftypefn") |
| DEFUN_DLD (cummin, args, nargout,"-*- texinfo -*-\n\
@deftypefn {Loadable Function} {} cummin (@var{x})\n\
@deftypefnx {Loadable Function} {} cummin (@var{x}, @var{dim})\n\
@deftypefnx {Loadable Function} {[@var{w}, @var{iw}] =} cummin (@var{x})\n\
Return the cumulative minimum values along dimension @var{dim}. If @var{dim}\n\
is unspecified it defaults to column-wise operation. For example:\n\
\n\
@example\n\
@group\n\
cummin ([5 4 6 2 3 1])\n\
@result{} 5 4 4 2 2 1\n\
@end group\n\
@end example\n\
\n\
\n\
The call\n\
\n\
@example\n\
[w, iw] = cummin (x)\n\
@end example\n\
\n\
@noindent\n\
with @code{x} a vector, is equivalent to the following code:\n\
\n\
@example\n\
@group\n\
w = iw = zeros (size (x));\n\
for i = 1:length (x)\n\
[w(i), iw(i)] = max (x(1:i));\n\
endfor\n\
@end group\n\
@end example\n\
\n\
@noindent\n\
but computed in a much faster manner.\n\
@seealso{cummax, min, max}\n\
@end deftypefn") |
| DEFUN_DLD (cummax, args, nargout,"-*- texinfo -*-\n\
@deftypefn {Loadable Function} {} cummax (@var{x})\n\
@deftypefnx {Loadable Function} {} cummax (@var{x}, @var{dim})\n\
@deftypefnx {Loadable Function} {[@var{w}, @var{iw}] =} cummax (@var{x})\n\
Return the cumulative maximum values along dimension @var{dim}. If @var{dim}\n\
is unspecified it defaults to column-wise operation. For example:\n\
\n\
@example\n\
@group\n\
cummax ([1 3 2 6 4 5])\n\
@result{} 1 3 3 6 6 6\n\
@end group\n\
@end example\n\
\n\
The call\n\
\n\
@example\n\
[w, iw] = cummax (x, dim)\n\
@end example\n\
\n\
@noindent\n\
with @code{x} a vector, is equivalent to the following code:\n\
\n\
@example\n\
@group\n\
w = iw = zeros (size (x));\n\
for i = 1:length (x)\n\
[w(i), iw(i)] = max (x(1:i));\n\
endfor\n\
@end group\n\
@end example\n\
\n\
@noindent\n\
but computed in a much faster manner.\n\
@seealso{cummin, max, min}\n\
@end deftypefn") |