wolffd@0: wolffd@0: wolffd@0: wolffd@0: Netlab Reference Manual minbrack wolffd@0: wolffd@0: wolffd@0: wolffd@0:

minbrack wolffd@0:

wolffd@0:

wolffd@0: Purpose wolffd@0:

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

wolffd@0: Description wolffd@0:

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

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

wolffd@0: Examples wolffd@0:

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

wolffd@0: Algorithm wolffd@0:

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

wolffd@0: See Also wolffd@0:

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

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