Mercurial > octave
changeset 27390:baeed03c3766
doc: Use common verbiage to describe input FUN in optimization functions.
* fminbnd.m, fminunc.m, fsolve.m: Use common verbiage to describe input FUN.
author | Rik <rik@octave.org> |
---|---|
date | Thu, 12 Sep 2019 09:57:34 -0700 |
parents | d4655f32dde7 |
children | a329a41cf341 |
files | scripts/optimization/fminbnd.m scripts/optimization/fminunc.m scripts/optimization/fsolve.m |
diffstat | 3 files changed, 13 insertions(+), 8 deletions(-) [+] |
line wrap: on
line diff
--- a/scripts/optimization/fminbnd.m Thu Sep 12 09:51:18 2019 -0700 +++ b/scripts/optimization/fminbnd.m Thu Sep 12 09:57:34 2019 -0700 @@ -24,7 +24,8 @@ ## @deftypefnx {} {[@var{x}, @var{fval}, @var{info}, @var{output}] =} fminbnd (@dots{}) ## Find a minimum point of a univariate function. ## -## @var{fun} must be a function handle or name. +## @var{fun} is a function handle, inline function, or string containing the +## name of the function to evaluate. ## ## The starting interval is specified by @var{a} (left boundary) and @var{b} ## (right boundary). The endpoints must be finite.
--- a/scripts/optimization/fminunc.m Thu Sep 12 09:51:18 2019 -0700 +++ b/scripts/optimization/fminunc.m Thu Sep 12 09:57:34 2019 -0700 @@ -25,11 +25,14 @@ ## Solve an unconstrained optimization problem defined by the function ## @var{fcn}. ## -## @var{fcn} should accept a vector (array) defining the unknown variables, and -## return the objective function value, optionally with gradient. ## @code{fminunc} attempts to determine a vector @var{x} such that ## @code{@var{fcn} (@var{x})} is a local minimum. ## +## @var{fun} is a function handle, inline function, or string containing the +## name of the function to evaluate. @var{fcn} should accept a vector (array) +## defining the unknown variables, and return the objective function value, +## optionally with gradient. +## ## @var{x0} determines a starting guess. The shape of @var{x0} is preserved in ## all calls to @var{fcn}, but otherwise is treated as a column vector. ##
--- a/scripts/optimization/fsolve.m Thu Sep 12 09:51:18 2019 -0700 +++ b/scripts/optimization/fsolve.m Thu Sep 12 09:57:34 2019 -0700 @@ -24,11 +24,12 @@ ## @deftypefnx {} {[@var{x}, @var{fval}, @var{info}, @var{output}, @var{fjac}] =} fsolve (@dots{}) ## Solve a system of nonlinear equations defined by the function @var{fcn}. ## -## @var{fcn} should accept a vector (array) defining the unknown variables, -## and return a vector of left-hand sides of the equations. Right-hand sides -## are defined to be zeros. In other words, this function attempts to -## determine a vector @var{x} such that @code{@var{fcn} (@var{x})} gives -## (approximately) all zeros. +## @var{fun} is a function handle, inline function, or string containing the +## name of the function to evaluate. @var{fcn} should accept a vector (array) +## defining the unknown variables, and return a vector of left-hand sides of +## the equations. Right-hand sides are defined to be zeros. In other words, +## this function attempts to determine a vector @var{x} such that +## @code{@var{fcn} (@var{x})} gives (approximately) all zeros. ## ## @var{x0} is an initial guess for the solution. The shape of @var{x0} is ## preserved in all calls to @var{fcn}, but otherwise is treated as a column