Example — Using Function Handles in Optimization
Function handles can be particularly useful in optimization work. If you have the MathWorks® Optimization Toolbox™ installed, click on any of the links below to find information and examples on this topic:
Passing Extra Parameters — Calling objective or constraint functions that have parameters in addition to the independent variable.
Anonymous Function Objectives — Use function handles in writing simple objective functions.
Nonlinear Curve Fitting with lsqcurvefit — An example using lsqcurvefit, which takes two inputs for the objective.