# fminbnd

Find minimum of single-variable function on fixed interval

## Syntax

## Description

`fminbnd`

is a one-dimensional minimizer
that finds a minimum for a problem specified by

$$\underset{x}{\mathrm{min}}f(x)\text{suchthat}{x}_{1}x{x}_{2}.$$

*x*, *x*_{1},
and *x*_{2} are finite scalars,
and *f*(*x*) is a function that
returns a scalar.

## 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. In such a case,`fmincon`

often gives faster and more accurate solutions.

## Algorithms

`fminbnd`

is a function file. The algorithm
is based on golden section search and parabolic interpolation. Unless
the left endpoint *x*_{1} is
very close to the right endpoint *x*_{2}, `fminbnd`

never
evaluates `fun`

at the endpoints, so `fun`

need
only be defined for *x* in the interval *x*_{1} < *x* < *x*_{2}.

If the minimum actually occurs at *x*_{1} or *x*_{2}, `fminbnd`

returns
a point `x`

in the interior of the interval (*x*_{1},*x*_{2})
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**