changeset 12632:2dbac27e0e40 stable

doc: miscellaneous touch-ups to documentation strings * debug.txi: Correct line number for debug example. * func.txi: Correct directory structure of functions shipped with Octave distribution. * edit.m: Eliminate reference to editor used by bug_report. * fzero.m: Add inline function to list of possible inputs. * fplot.m: Add comma to break list of possible inputs. * qqplot.m: Correct example so that it runs under current Octave distributions. * assert.m: Add seealso reference to fail. * fail.m: Add seealso reference to assert. Add additional calling forms of function. * load-path.cc (addpath): Don't use @samp which created double double quotes around option. * ov-fcn-inline.cc (vectorize): Add example usage. * variables.cc (exist): Add seealso link to file_in_loadpath.
author Rik <octave@nomad.inbox5.com>
date Mon, 25 Apr 2011 09:24:33 -0700
parents 8c25df502846
children accd03f66982
files doc/interpreter/debug.txi doc/interpreter/func.txi scripts/miscellaneous/edit.m scripts/optimization/fzero.m scripts/plot/fplot.m scripts/statistics/base/qqplot.m scripts/testfun/assert.m scripts/testfun/fail.m src/load-path.cc src/ov-fcn-inline.cc src/variables.cc
diffstat 11 files changed, 50 insertions(+), 27 deletions(-) [+]
line wrap: on
line diff
--- a/doc/interpreter/debug.txi
+++ b/doc/interpreter/debug.txi
@@ -89,7 +89,7 @@
 @example
 @group
 dbstop ("asind", 1)
-@result{} 27
+@result{} 28
 @end group
 @end example
 
@@ -102,7 +102,7 @@
 
 @noindent
 Taking the above as an example, @code{dbstatus ("asind")} should return
-27.  The breakpoints can then be cleared with the @code{dbclear} function
+28.  The breakpoints can then be cleared with the @code{dbclear} function
 
 @DOCSTRING(dbclear)
 
--- a/doc/interpreter/func.txi
+++ b/doc/interpreter/func.txi
@@ -1295,21 +1295,26 @@
 @item audio
 Functions for playing and recording sounds.
 
-@item control
-Functions for design and simulation of automatic control systems.
+@item deprecated
+Out-of-date functions which will eventually be removed from Octave.
 
 @item elfun
-Elementary functions.
+Elementary functions, principally trigonometric.
 
-@item finance
-Functions for computing interest payments, investment values, and rates
-of return.
+@item @@ftp
+Class functions for the FTP object.
 
 @item general
 Miscellaneous matrix manipulations, like @code{flipud}, @code{rot90},
 and @code{triu}, as well as other basic functions, like
 @code{ismatrix}, @code{nargchk}, etc.
 
+@item geometry
+Functions related to Delaunay triangulation.
+
+@item help
+Functions for Octave's built-in help system.
+
 @item image
 Image processing tools.  These functions require the X Window System.
 
@@ -1323,13 +1328,13 @@
 Functions that don't really belong anywhere else.
 
 @item optimization
-Minimization of functions.
+Functions related to minimzation, optimization, and root finding.
 
 @item path
 Functions to manage the directory path Octave uses to find functions.
 
 @item pkg
-Install external packages of functions in Octave.
+Package manager for installing external packages of functions in Octave.
 
 @item plot
 Functions for displaying and printing two- and three-dimensional graphs.
@@ -1347,10 +1352,11 @@
 Functions for handling sparse matrices.
 
 @item specfun
-Special functions.
+Special functions such as @code{bessel} or @code{factor}.
 
 @item special-matrix
-Functions that create special matrix forms.
+Functions that create special matrix forms such as Hilbert or Vandermonde
+matrices.
 
 @item startup
 Octave's system-wide startup file.
@@ -1362,8 +1368,8 @@
 Miscellaneous string-handling functions.
 
 @item testfun
-Perform unit tests on other functions.
+Functions for performing unit tests on other functions.
 
 @item time
-Functions related to time keeping.
+Functions related to time and date processing.
 @end table
--- a/scripts/miscellaneous/edit.m
+++ b/scripts/miscellaneous/edit.m
@@ -76,7 +76,7 @@
 ## In place of the function name.  For example,
 ## @table @samp
 ## @item [EDITOR, " %s"]
-## Use the editor which Octave uses for @code{bug_report}.
+## Use the editor which Octave uses for @code{edit_history}.
 ##
 ## @item "xedit %s &"
 ## pop up simple X11 editor in a separate window
--- a/scripts/optimization/fzero.m
+++ b/scripts/optimization/fzero.m
@@ -24,10 +24,12 @@
 ## @deftypefnx {Function File} {[@var{x}, @var{fval}, @var{info}, @var{output}] =} fzero (@dots{})
 ## Find a zero of a univariate function.
 ##
-## @var{fun} should be a function handle or name.  @var{x0} should be a
-## two-element vector specifying two points which bracket a zero.  In
-## other words, there must be a change in sign of the function between
-## @var{x0}(1) and @var{x0}(2).  More mathematically, the following must hold
+## @var{fun} is a function handle, inline function, or string
+## containing the name of the function to evaluate.
+## @var{x0} should be a two-element vector specifying two points which
+## bracket a zero.  In other words, there must be a change in sign of the
+## function between @var{x0}(1) and @var{x0}(2).  More mathematically, the
+## following must hold
 ##
 ## @example
 ## sign (@var{fun}(@var{x0}(1))) * sign (@var{fun}(@var{x0}(2))) <= 0
--- a/scripts/plot/fplot.m
+++ b/scripts/plot/fplot.m
@@ -21,8 +21,9 @@
 ## @deftypefnx {Function File} {} fplot (@var{fn}, @var{limits}, @var{tol})
 ## @deftypefnx {Function File} {} fplot (@var{fn}, @var{limits}, @var{n})
 ## @deftypefnx {Function File} {} fplot (@dots{}, @var{fmt})
-## Plot a function @var{fn}, within the defined limits.  @var{fn}
-## an be either a string, a function handle or an inline function.
+## Plot a function @var{fn} within defined limits.
+## @var{fn} is a function handle, inline function, or string
+## containing the name of the function to evaluate.
 ## The limits of the plot are given by @var{limits} of the form
 ## @code{[@var{xlo}, @var{xhi}]} or @code{[@var{xlo}, @var{xhi},
 ## @var{ylo}, @var{yhi}]}.  @var{tol} is the default tolerance to use for the
--- a/scripts/statistics/base/qqplot.m
+++ b/scripts/statistics/base/qqplot.m
@@ -20,6 +20,7 @@
 ## @deftypefn  {Function File} {[@var{q}, @var{s}] =} qqplot (@var{x})
 ## @deftypefnx {Function File} {[@var{q}, @var{s}] =} qqplot (@var{x}, @var{dist})
 ## @deftypefnx {Function File} {[@var{q}, @var{s}] =} qqplot (@var{x}, @var{dist}, @var{params})
+## @deftypefnx {Function File} {} qqplot (@dots{})
 ## Perform a QQ-plot (quantile plot).
 ##
 ## If F is the CDF of the distribution @var{dist} with parameters
@@ -37,7 +38,7 @@
 ## distribution on [2,4] and @var{x}, use
 ##
 ## @example
-## qqplot (x, "uniform", 2, 4)
+## qqplot (x, "unif", 2, 4)
 ## @end example
 ##
 ## @noindent
--- a/scripts/testfun/assert.m
+++ b/scripts/testfun/assert.m
@@ -51,7 +51,7 @@
 ## @var{expected})}.  If @var{expected} is zero @var{tol} will always be used as
 ## an absolute tolerance.
 ## @end table
-## @seealso{test}
+## @seealso{test, fail}
 ## @end deftypefn
 
 ## FIXME: Output throttling: don't print out the entire 100x100 matrix,
--- a/scripts/testfun/fail.m
+++ b/scripts/testfun/fail.m
@@ -20,7 +20,8 @@
 ## public domain.
 
 ## -*- texinfo -*-
-## @deftypefn  {Function File} {} fail (@var{code}, @var{pattern})
+## @deftypefn  {Function File} {} fail (@var{code})
+## @deftypefnx {Function File} {} fail (@var{code}, @var{pattern})
 ## @deftypefnx {Function File} {} fail (@var{code}, 'warning', @var{pattern})
 ##
 ## Return true if @var{code} fails with an error message matching
@@ -45,7 +46,7 @@
 ## Called with three arguments, the behavior is similar to
 ## @code{fail(@var{code}, @var{pattern})}, but produces an error if no
 ## warning is given during code execution or if the code fails.
-##
+## @seealso{assert}
 ## @end deftypefn
 
 ## Author: Paul Kienzle <pkienzle@users.sf.net>
--- a/src/load-path.cc
+++ b/src/load-path.cc
@@ -2122,8 +2122,8 @@
 @deftypefn  {Built-in Function} {} addpath (@var{dir1}, @dots{})\n\
 @deftypefnx {Built-in Function} {} addpath (@var{dir1}, @dots{}, @var{option})\n\
 Add @var{dir1}, @dots{} to the current function search path.  If\n\
-@var{option} is @samp{\"-begin\"} or 0 (the default), prepend the\n\
-directory name to the current path.  If @var{option} is @samp{\"-end\"}\n\
+@var{option} is \"-begin\" or 0 (the default), prepend the\n\
+directory name to the current path.  If @var{option} is \"-end\"\n\
 or 1, append the directory name to the current path.\n\
 Directories added to the path must exist.\n\
 \n\
--- a/src/ov-fcn-inline.cc
+++ b/src/ov-fcn-inline.cc
@@ -879,6 +879,17 @@
 Create a vectorized version of the inline function @var{fun}\n\
 by replacing all occurrences of @code{*}, @code{/}, etc., with\n\
 @code{.*}, @code{./}, etc.\n\
+\n\
+This may be useful, for example, when using inline functions with\n\
+numerical integration or optimization where a vector-valued function\n\
+is expected.\n\
+\n\
+@example\n\
+fcn = vectorize (inline (\"x^2 - 1\"))\n\
+   @result{} fcn = f(x) = x.^2 - 1\n\
+quadv (fcn, 0, 3)\n\
+   @result{} 6\n\
+@end example\n\
 @end deftypefn")
 {
   octave_value retval;
--- a/src/variables.cc
+++ b/src/variables.cc
@@ -546,6 +546,7 @@
 @item \"dir\"\n\
 Check only for directories.\n\
 @end table\n\
+@seealso{file_in_loadpath}\n\
 @end deftypefn")
 {
   octave_value retval = false;