Daniel@0: Daniel@0: Daniel@0: Daniel@0: Netlab Reference Manual minbrack Daniel@0: Daniel@0: Daniel@0: Daniel@0:

minbrack Daniel@0:

Daniel@0:

Daniel@0: Purpose Daniel@0:

Daniel@0: Bracket a minimum of a function of one variable. Daniel@0: Daniel@0:

Daniel@0: Description Daniel@0:

Daniel@0: brmin, brmid, brmax, numevals] = minbrack(f, a, b, fa) Daniel@0: finds a bracket of three points around a local minimum of Daniel@0: f. The function f must have a one dimensional domain. Daniel@0: a < b is an initial guess at the minimum and maximum points Daniel@0: of a bracket, but minbrack will search outside this interval if Daniel@0: necessary. The bracket consists of three points (in increasing order) Daniel@0: such that f(brmid) < f(brmin) and f(brmid) < f(brmax). Daniel@0: fa is the value of the function at a: it is included to Daniel@0: avoid unnecessary function evaluations in the optimization routines. Daniel@0: The return value numevals is the number of function evaluations Daniel@0: in minbrack. Daniel@0: Daniel@0:

minbrack(f, a, b, fa, p1, p2, ...) allows additional Daniel@0: arguments to be passed to f Daniel@0: Daniel@0:

Daniel@0: Examples Daniel@0:

Daniel@0: An example of the use of this function to bracket the minimum of a function Daniel@0: f in the direction sd can be found in linemin Daniel@0:
Daniel@0: 
Daniel@0: [min, mid, max, nevals]] = minbrack('linef', 0.0, 1.0, fa, f, pt, dir);
Daniel@0: 
Daniel@0: Daniel@0: where the function linef is used to turn a general function f Daniel@0: into a one dimensional one. Daniel@0: Daniel@0:

Daniel@0: Algorithm Daniel@0:

Daniel@0: Daniel@0: Quadratic extrapolation with a limit to the maximum step size is Daniel@0: used to find the outside points of the bracket. This implementation Daniel@0: is based on that in Numerical Recipes. Daniel@0: Daniel@0:

Daniel@0: See Also Daniel@0:

Daniel@0: linemin, linef
Daniel@0: Pages: Daniel@0: Index Daniel@0:
Daniel@0:

Copyright (c) Ian T Nabney (1996-9) Daniel@0: Daniel@0: Daniel@0: Daniel@0: