Did you try the documentation examples?
- Solve a Constrained Nonlinear Problem, Solver-Based
- Get Started with Optimize Live Editor Task
- Optimize Live Editor Task with fmincon Solver
- Optimize Live Editor Task with lsqlin Solver
- Optimize Using the GPS Algorithm (Global Optimization Toolbox)
- Minimize Function with Many Local Minima (Global Optimization Toolbox)
- Pareto Front for Two Objectives (Global Optimization Toolbox)
There are tips on effective use here: Use Optimize Live Editor Task Effectively. I hope that one or more of these links help you.
Alan Weiss
MATLAB mathematical toolbox documentation