Define your objective function (called a fitness function for the
ga
solver) as an anonymous function or function
file. The examples show how to write a function and how to pass extra
parameters, if necessary.
How to write objective (fitness) function files.
How to optimize for a maximum instead of a minimum.
Including extra parameters or data in your objective or nonlinear constraint functions.
How to find a local or global optimum.