fmincon and fmiunc gives different result for the same problem
4 次查看(过去 30 天)
显示 更早的评论
Can anyone help how to setup the result from fmincon and fminunc to give the same result for same problem ?
Thanks
0 个评论
采纳的回答
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 .
更多回答(0 个)
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!