Next: Additional parameters, Previous: Common optimization options, Up: Top [Index]
It can be convenient not to handle the optimized parameters as elements
of a vector, but as named fields of a structure. The frontends
nonlin_residmin
, nonlin_curvefit
, residmin_stat
,
curvefit_stat
, and nonlin_min
can accept parameter
information in structure form, and can pass the parameters as a
structure to user functions, although the backends still handle the
parameters as vectors.
To use this feature, the initial parameters must be given in structure
form, or the setting param_order
must be given, a cell-array with
names of the parameters. If both is done, only the parameters in
structure fields named in param_order
will be optimized. If
there are still some non-structure-based configuration settings or user
functions, specifying param_order
is mandatory even if the
initial parameters are given in structure form.
If the initial parameters are a structure, the parameters being the optimization result will also be returned as a structure.
• Structure-based user functions: | Specify which user functions accept parameter structures. | |
• Structure-based gradients and Hessians: | Format of returned values of structure-based gradient and Hessian functions. | |
• Structure-based linear constraints: | Specify structure-based linear constraints. | |
• Structure-based configuration settings: | Parameter-related configuration settings in structure form. | |
• Non-scalar parameters: | Handling named parameter arrays. |