Find minimum of single-variable function on fixed interval
fminbnd is a one-dimensional minimizer
that finds a minimum for a problem specified by
x, x1, and x2 are finite scalars, and f(x) is a function that returns a scalar.
x = fminbnd(fun,x1,x2)x = fminbnd(fun,x1,x2,options)x = fminbnd(problem)[x,fval]
= fminbnd(___)[x,fval,exitflag]
= fminbnd(___)[x,fval,exitflag,output]
= fminbnd(___) finds
the minimum for x = fminbnd(problem)problem, where problem is
a structure.
Create problem by exporting a problem from
Optimization app, as described in Exporting Your Work.
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.
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.
[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.
fmincon | fminsearch | optimset | optimtool