fminbnd
Find local minimum of single-variable function on fixed interval
Syntax
Description
fminbnd
is a one-dimensional minimizer that finds a local
minimum for a problem specified by
x, x1, and x2 are finite scalars, and f(x) is a function that returns a scalar.
If multiple local minima exist on the interval (x1,x2)
,
fminbnd
returns only one, which is not guaranteed to be the
global minimum. For details, see Local vs. Global Minimum.
Examples
Input Arguments
Output Arguments
Limitations
The function to be minimized must be continuous.
fminbnd
might only give local solutions.fminbnd
can exhibit slow convergence when the solution is on a boundary of the interval.
More About
Algorithms
fminbnd
is a function file. The algorithm
is based on golden section search and parabolic interpolation. Unless
the left endpoint x1 is
very close to the right endpoint x2, fminbnd
never
evaluates fun
at the endpoints, so fun
need
only be defined for x in the interval x1 < x < x2.
If the minimum actually occurs at x1 or x2, fminbnd
returns
a point x
in the interior of the interval (x1,x2)
that is close to the minimizer. In this case, the distance of x
from
the minimizer is no more than 2*(TolX + 3*abs(x)*sqrt(eps))
. See [1] or [2] for details
about the algorithm.
Alternative Functionality
App
The Optimize Live Editor task provides a visual interface for
fminbnd
.
References
[1] Forsythe, G. E., M. A. Malcolm, and C. B. Moler. Computer Methods for Mathematical Computations. Englewood Cliffs, NJ: Prentice Hall, 1976.
[2] Brent, Richard. P. Algorithms for Minimization without Derivatives. Englewood Cliffs, NJ: Prentice-Hall, 1973.
Extended Capabilities
Version History
Introduced before R2006a