Main Content

Optimization

Minimum of single and multivariable functions, nonnegative least-squares, roots of nonlinear functions

Optimizers attempt to locate a local minimum of a nonlinear objective function. Search for a minimum of a function of one variable on a bounded interval using fminbnd, or a minimum of a function of several variables on an unbounded domain using fminsearch. Maximize a function by minimizing its negative.

Search for a nonnegative solution to a linear least-squares problem using lsqnonneg.

The equation solver fzero finds a real root of a nonlinear scalar function.

Control the output or other aspects of your optimization by setting options using optimset.

Solve problems and set options using a visual interface with the Optimize Live Editor task.

Functions

expand all

fminbndFind local minimum of single-variable function on fixed interval
fminsearchSearch for local minimum of unconstrained multivariable function using derivative-free method
lsqnonnegSolve nonnegative linear least-squares problem
fzeroRoot of nonlinear function
optimgetOptimization options values
optimsetCreate or modify optimization options structure

Live Editor Tasks

OptimizeOptimize in the Live Editor (Since R2020b)

Topics