fmincon and fmiunc gives different result for the same problem

조회 수: 4 (최근 30일)
HN
HN 2020년 11월 29일
댓글: HN 2020년 11월 29일
Can anyone help how to setup the result from fmincon and fminunc to give the same result for same problem ?
Thanks

채택된 답변

Walter Roberson
Walter Roberson 2020년 11월 29일
This is expected. fmincon() and fminunc() use different algorithms.
You might possibly be able to get somewhere by forcing fminunc to use 'trust-region' algorithm, which requires that your function outputs the gradient as its second output, and requires some flags set in the options. You would in turn configure fmincon to use 'trust-region-reflective'; again that requires that your function outputs the gradient as its second output, and requires some flags set in the options.
It is not entirely clear to me that the 'trust-region' algorithm of fminunc is the same as 'trust-region-reflective' of fmincon .
  댓글 수: 1
HN
HN 2020년 11월 29일
Thank you so much Walter Roberson ,
I also have two more quesions.
  1. Fminunc option I used can only dispaly the final optimum point or cannot list all searched points toward the optimum point. How can I handle that. or
  2. Can I automatically pick the minimum value of the funciton and corresponding optimum point ?
Thank you

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

추가 답변 (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