Using the optimization toolbox

1 次查看(过去 30 天)
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

采纳的回答

Matt Tearle
Matt Tearle 2014-4-8
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... :)

更多回答(0 个)

Community Treasure Hunt

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

Start Hunting!

Translated by