Main Content
Define Objective Function
Define the function to minimize or maximize, representing
your problem
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.
Topics
- Compute Objective Functions
How to write objective (fitness) function files.
- Maximizing vs. Minimizing
How to optimize for a maximum instead of a minimum.
- Passing Extra Parameters
Including extra parameters or data in your objective or nonlinear constraint functions.
- Optimization Workflow
How to find a local or global optimum.