[x, options] = linemin(f, pt, dir, fpt, options) uses Brent's
algorithm to find the minimum of the function f(x) along the
line dir through the point pt. The function value at the
starting point is fpt. The point at which f has a local minimum
is returned as x. The function value at that point is returned
in options(8).
linemin(f, pt, dir, fpt, options, p1, p2, ...) allows
additional arguments to be passed to f().
The optional parameters have the following interpretations.
options(1) is set to 1 to display error values.
options(2) is a measure of the absolute precision required for the value
of x at the solution.
options(3) is a measure of the precision required of the objective
function at the solution. Both this and the previous condition must be
satisfied for termination.
options(14) is the maximum number of iterations; default 100.
f in the direction sd can be found in conjgrad
x = linemin(f, xold, sd, fold, lineoptions);
minbrack). This is adapted
to minimize a function along a line.
This implementation
is based on that in Numerical Recipes.
conjgrad, minbrack, quasinewCopyright (c) Ian T Nabney (1996-9)