Optimization Options in Common Use: Tuning and Troubleshooting
You set or change optimization options when the default settings do not work sufficiently well. This can mean the solver takes too long to converge, the solver fails, or you are unsure of the reliability of the result.
To tune your solver for improved speed or accuracy, try setting these options first:
Choosing the Algorithm —
Algorithm
Tolerances and Stopping Criteria —
OptimalityTolerance
,StepTolerance
,MaxFunctionEvaluations
, andMaxIterations
Finite differences —
FiniteDifferenceType
andFiniteDifferenceStepSize
To diagnose and troubleshoot, try setting these options first:
Iterative Display —
Display
Function evaluation errors —
FunValCheck
Plot Functions and Output Functions for Optimization Toolbox —
PlotFcn
andOutputFcn