Navigation

Operators and Keywords

Function List:

C++ API

Function File: [x, fval, info, output] = fminbnd (fun, a, b, options)

Find a minimum point of a univariate function.

fun should be a function handle or name. a, b specify a starting interval. options is a structure specifying additional options. Currently, fminbnd recognizes these options: "FunValCheck", "OutputFcn", "TolX", "MaxIter", "MaxFunEvals". For a description of these options, see ‘optimset’.

On exit, the function returns x, the approximate minimum point and fval, the function value thereof.

info is an exit flag that can have these values:

  • 1 The algorithm converged to a solution.
  • 0 Maximum number of iterations or function evaluations has been exhausted.
  • -1 The algorithm has been terminated from user output function.

Notes: The search for a minimum is restricted to be in the interval bound by a and b. If you only have an initial point to begin searching from you will need to use an unconstrained minimization algorithm such as fminunc or fminsearch. fminbnd internally uses a Golden Section search strategy.

See also: fzero, fminunc, fminsearch, optimset.

Package: octave