필터 지우기
필터 지우기

How does fmincon works? Changing not binding restrictions changes the result

조회 수: 3 (최근 30일)
Javier
Javier 2013년 12월 4일
편집: Matt J 2013년 12월 4일
Hello.
I am working with the function fmincon and I have noticed that changing a restriction can alter the result even when this restriction is not binding.
For example, I am using the code
[theta] = fmincon('gmmsimobj2',theta0,[0 -5 -1],[0],[],[],[0.001 -1 0],[1 0 1],[],foptions,simfunc,e,sp,beta,momfunc,y,mp,alg,W);
Which gives me a result of theta=[0.0177 0 6.8070e-005].
Then I change some restrictions that were not binding before
[theta] = fmincon('gmmsimobj2',theta0,[0 -5 -1],[0],[],[],[0.001 -inf 0],[inf 0 inf],[],foptions,simfunc,e,sp,beta,momfunc,y,mp,alg,W);
This gives a result of theta=[0.0148 -7.7908e-004 0.0039], which in fact was a possible answer in the last excercise (it did not violate any of the previous restrictions).
Could you tell me why the result changes? I do not know exactly how this function works. How can these changes in the restrictions affect the result?
Thank you! Javier
  댓글 수: 1
Matt J
Matt J 2013년 12월 4일
편집: Matt J 2013년 12월 4일
You should ALWAYS call fmincon with at least 4 output arguments
[theta,fval,exitflag,output] = fmincon(...)
When you do, what are the values of the out arguments in each case?

댓글을 달려면 로그인하십시오.

답변 (0개)

카테고리

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