[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
patch for min max texinfo strings
From: |
Jskud |
Subject: |
patch for min max texinfo strings |
Date: |
Sat, 27 Sep 2003 20:27:45 -0700 |
Working with the latest development release, I noticed that the min()
and max() documentation needed to be fixed -- the "function header" was
missing from the info file, and the two input arg forms were not
described. Here is a set of patches to fix those problems.
*** /opt/src/octave-2.1.50/./src/ChangeLog-ORIG Fri Jun 27 12:19:54 2003
--- /opt/src/octave-2.1.50/./src/ChangeLog Sat Sep 27 20:12:36 2003
***************
*** 1,3 ****
--- 1,8 ----
+ 2003-09-27 Joseph P. Skudlarek <address@hidden>
+
+ * DLD-FUNCTIONS/minmax.cc (min, max): Use @deftypefn machinery,
+ doc missing semantics, and add more examples to texinfo strings.
+
2003-06-26 John W. Eaton <address@hidden>
* variables.cc (symbol_exist): Distinguish between user and dld
*** /opt/src/octave-2.1.50/./src/DLD-FUNCTIONS/minmax.cc-ORIG Mon Feb 3
09:36:46 2003
--- /opt/src/octave-2.1.50/./src/DLD-FUNCTIONS/minmax.cc Sat Sep 27
20:00:12 2003
***************
*** 275,330 ****
DEFUN_DLD (min, args, nargout,
"-*- texinfo -*-\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. Thus,\n\
\n\
@example\n\
min (min (@var{x}))\n\
@end example\n\
\n\
@noindent\n\
! returns the smallest element of @var{x}.\n\
\n\
For complex arguments, the magnitude of the elements are used for\n\
comparison.\n\
\n\
! If called with two output arguments, also returns the index of the\n\
minimum value(s). Thus,\n\
@example\n\
[x, ix] = min ([1, 3, 0, 2, 5])\n\
@end example\n\
! \n\
! @noindent\n\
! returns @var{x} = 0 and @var{ix} = 3.")
{
MINMAX_BODY (min);
}
DEFUN_DLD (max, args, nargout,
"-*- texinfo -*-\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. Thus,\n\
\n\
@example\n\
max (max (@var{x}))\n\
@end example\n\
\n\
@noindent\n\
! returns the largest element of @var{x}.\n\
\n\
For complex arguments, the magnitude of the elements are used for\n\
comparison.\n\
\n\
! If called with two output arguments, also returns the index of the\n\
maximum value(s). Thus,\n\
@example\n\
! [x, ix] = max([1, 3, 5, 2, 5])\n\
@end example\n\
! \n\
! @noindent\n\
! returns @var{x} = 5 and @var{ix} = 3.")
{
MINMAX_BODY (max);
}
--- 275,366 ----
DEFUN_DLD (min, args, nargout,
"-*- texinfo -*-\n\
+ @deftypefn {Mapping Function} address@hidden, @var{iw}] =} min (@var{x})\n\
+ @deftypefnx {Mapping Function} {} min (@var{x}, @var{y})\n\
+ @cindex Utility Functions\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.\n\
! For two matrices (or a matrix and scalar),\n\
! 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\
! @noindent \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, 5])\n\
+ @result{} x = 0\n\
+ ix = 3\n\
+ @end group\n\
@end example\n\
! @end deftypefn")
{
MINMAX_BODY (min);
}
DEFUN_DLD (max, args, nargout,
"-*- texinfo -*-\n\
+ @deftypefn {Mapping Function} address@hidden, @var{iw}] =} max (@var{x})\n\
+ @deftypefnx {Mapping Function} {} max (@var{x}, @var{y})\n\
+ @cindex Utility Functions\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.\n\
! For two matrices (or a matrix and scalar),\n\
! 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 @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\
! @noindent \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\
! @end deftypefn")
{
MINMAX_BODY (max);
}
[]
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- patch for min max texinfo strings,
Jskud <=