Choose an optimizer based on problem characteristics and on the type of solution you want. Solver Characteristics contains more information to help you decide which solver is likely to be most suitable. This table gives recommendations that are suitable for most problems.
|Problem Type||Recommended Solver|
|Smooth (objective twice differentiable), and you want a local solution||An appropriate Optimization Toolbox™ solver; see Optimization Decision Table|
|Smooth (objective twice differentiable), and you want a global solution or multiple local solutions|
|Nonsmooth, and you want a local solution|
|Nonsmooth, and you want a global solution or multiple local solutions|
patternsearch at multiple points
when you have finite bounds
every component, try
x0 = rand(size(lb)).*(ub - lb);
There are many other solvers with different solution algorithms,
including the genetic algorithm solver
particleswarm solver. Try some
of them if the recommended solvers do not perform well on your problem.
For details, see Global Optimization Toolbox Solver Characteristics.