Contents Previous Next Subchapters

Minimization Along A Direction In A Vector Space
Syntax [betaoutnf] = minline(function f,
See Also brent , conjdir , conjgrad

Sets betaout the value of beta that solves the problem:
     minimize f(xref + beta dir) with respect to beta
where beta is a scalar with the same type as xref. If minline can not decrease the value of f in the direction dir, betaout is exactly equal to zero. If present, the return value nf is set to the number of function evaluations used for the minimization.

returns a scalar value with the same type as xref provided that x has the same type and dimension as xref.

is a real or double-precision column vector that specifies the reference point for the line search.

is a nonzero scalar that has the same type as xref and specifies the initial step size for the line search parameter.

is a vector with the same type and dimension as xref. It specifies the direction of the line search.

is an integer scalar that specifies the level of tracing inside minline.
Name Condition Description
nf level > 1 number calls to f
beta level > 1 step factor
f(x) level > 1 objective value
bmin level > 1 final step
fmin level > 1 final objective

if present, maxdx specifies the maximum absolute change; that is,

     | beta dir  |  < maxdx  for all i
               i           i
and maxdx must have the same type and dimension as xref. If maxdx is not present, the vector defined by
     maxdx  = 100 betain (|dir | + |dir| / 100)
          i                   i
is used.

if present, maxf specifies the maximum number of evaluations of f to allow. If minline terminates because of this limit, nf is set to maxf + 1

The following example minimizes the function
                       2                      2
     (2 + beta * 0 - 1)  +  (2 + beta * 1 - 1)

with respect to beta.
     function f(x) begin
               return (x(1) - 1.)^2 + (x(2) - 1.)^2
     xref   = {2., 2.}
     betain = 1 / 3.
     dir    = {0., 1.}
     minline(function f, xref, betain, dir)