Using the optimization toolbox

1 view (last 30 days)
maroua maro
maroua maro on 8 Apr 2014
Commented: maroua maro on 10 Apr 2014
Hello all, My question is about the use of the matlab optimization toolbox. I have a problem of maximization and according to the algorithm there is a jacobian matrix to be updated in every iteration of the running algorithm. So, i need to know, does the optimization toolbox implements the methode of solving and i have just to define my objective function to minimize or maximize and specify my constraints?
Thanks for answering my question it may be seem very basic because it is the first time i use matlab for optimization problems

Accepted Answer

Matt Tearle
Matt Tearle on 8 Apr 2014
Yes, Optim TB allows you to just specify the objective function (as a minimization problem -- change the sign if you want maximization) and the constraints. The various solvers have similar syntax.
Use this table to choose your solver. For constrained nonlinear problems, the standard optimization solver is fmincon.
To specify the objective, you should write it as a function and pass a function handle to fmincon. See the doc for details on this. You can specify derivative information if you want to and know how (also mentioned in the previous doc link), but it's not necessary. It can help with performance, if that's an issue; if not, I wouldn't bother with it.
And of course I have to mention that we (MathWorks) would be happy to teach you all this in detail, for a small fee... :)

More Answers (0)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!