how does fmincon work

조회 수: 55 (최근 30일)
xueqi
xueqi 2014년 1월 6일
편집: Alan Weiss 2014년 1월 6일
Hi fellows,
Do you understand how does fmincon work exactly? I can not find a documentation in the HELP. It seems they are all just about how to set up the optimization problem. I would like to see an example of demonstration that how it finds a local minimum. It will include the searching path with respect to a particular start point. And especially how it stops with respect to the tolerances. I would be really grateful if you can show me that or tell me how to do that.
Thanks! :)

채택된 답변

Matt J
Matt J 2014년 1월 6일
It seems they are all just about how to set up the optimization problem. I would like to see an example of demonstration that how it finds a local minimum.
"doc fmincon" does contain an example that includes not just setting up the optimization problem, but also running fmincon itself and obtaining a solution.
And especially how it stops with respect to the tolerances.
By default, fmincon will print messages saying what stopping tolerance was met. Calling fmincon with additional output arguments is also a way to obtain further information,
[x,fval,exitflag,output] = fmincon(...)
It will include the searching path with respect to a particular start point.
If you mean you want intermediate iterations saved, that is a more advanced thing that requires the 'OutputFcn' option. This link gives an example of how to do it, though,

추가 답변 (1개)

Alan Weiss
Alan Weiss 2014년 1월 6일
편집: Alan Weiss 2014년 1월 6일
The algorithms fmincon uses are documented here. You can see a nice visual example of how fminunc minimizes Rosenbrock's function by executing
bandem
at the MATLAB command line. And you can read about tolerances and stopping criteria here.
Alan Weiss
MATLAB mathematical toolbox documentation

카테고리

Help CenterFile Exchange에서 Solver Outputs and Iterative Display에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by