view toolboxes/FullBNT-1.0.7/nethelp3.3/minbrack.htm @ 0:e9a9cd732c1e tip

first hg version after svn
author wolffd
date Tue, 10 Feb 2015 15:05:51 +0000
parents
children
line wrap: on
line source
<html>
<head>
<title>
Netlab Reference Manual minbrack
</title>
</head>
<body>
<H1> minbrack
</H1>
<h2>
Purpose
</h2>
Bracket a minimum of a function of one variable.

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

<p><CODE>minbrack(f, a, b, fa, p1, p2, ...)</CODE> allows additional
arguments to be passed to <CODE>f</CODE>

<p><h2>
Examples
</h2>
An example of the use of this function to bracket the minimum of a function
<CODE>f</CODE> in the direction <CODE>sd</CODE> can be found in <CODE>linemin</CODE>
<PRE>

[min, mid, max, nevals]] = minbrack('linef', 0.0, 1.0, fa, f, pt, dir);
</PRE>

where the function <CODE>linef</CODE> is used to turn a general function <CODE>f</CODE>
into a one dimensional one.

<p><h2>
Algorithm
</h2>

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

<p><h2>
See Also
</h2>
<CODE><a href="linemin.htm">linemin</a></CODE>, <CODE><a href="linef.htm">linef</a></CODE><hr>
<b>Pages:</b>
<a href="index.htm">Index</a>
<hr>
<p>Copyright (c) Ian T Nabney (1996-9)


</body>
</html>