Use two nonlinear optimization solvers and how to set options. The nonlinear solvers that we use in this example are fminunc and fmincon .
Fit a nonlinear function to data using several Optimization Toolbox™ algorithms.
Create an initial point for an optimization problem that has named index variables. For named index variables, often the easiest way to specify an initial point is to use the findindex
Optimization variables can use names for indexing elements. You can give the names when you create a variable or afterward. For example, give the names while creating the variable.
You can create and debug some problems easily by using named index variables. For example, consider the variable x that is indexed by the names in vars :