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 —
AlgorithmTolerances and Stopping Criteria —
OptimalityTolerance,StepTolerance,MaxFunctionEvaluations, andMaxIterationsFinite differences —
FiniteDifferenceTypeandFiniteDifferenceStepSize
To diagnose and troubleshoot, try setting these options first:
Iterative Display —
DisplayFunction evaluation errors —
FunValCheckPlot Functions and Output Functions for Optimization Toolbox —
PlotFcnandOutputFcn