Parameter structures - optim_doc
Description: optim_doc

Next: Additional parameters, Previous: Common optimization options, Up: Top

## 9 Handling of structures of optimized parameters

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.