Optimization
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
Live Editor Tasks
Optimize | Optimize in the Live Editor (Since R2020b) |
Topics
- Optimizing Nonlinear Functions
Minimizing and maximizing in one or more dimensions.
- Curve Fitting via Optimization
This example shows how to fit a nonlinear function to data by minimizing the sum of squared errors.
- Optimize Live Editor Task
Optimize using a visual interface.
- Set Optimization Options
Controlling an optimization, displaying intermediate calculations.
- Optimization Solver Iterative Display
Obtain intermediate output.
- Optimization Solver Output Functions
Describes how to monitor or halt solvers.
- Optimization Solver Plot Functions
Describes how to monitor solvers visually.
- Roots of Scalar Functions
Solve a nonlinear equation of one real variable.
- Optimization Troubleshooting and Tips
How to address common issues.