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