Global Optimization Toolbox optimization functions minimize the objective or fitness function. That is, they solve problems of the form
If you want to maximize f(x), minimize –f(x), because the point at which the minimum of –f(x) occurs is the same as the point at which the maximum of f(x) occurs.
For example, suppose you want to maximize the function
Write your function file to compute
and minimize g(x).