フィルターのクリア

fmincon: firstorderopt at each iteration

2 ビュー (過去 30 日間)
Pengfei
Pengfei 2015 年 9 月 29 日
コメント済み: Pengfei 2015 年 10 月 1 日
how to find the source code where optimValues.firstorderopt is computed?
optimValues.firstorderopt is shared by several iterative optimization algorithms. I want to see the formula used for it. But I can't trace it down, "Find Files" tried but no work.
Thank you!

採用された回答

Madhav Rajan
Madhav Rajan 2015 年 10 月 1 日
I understand that you want to figure out how 'optimValues.firstorderopt' is computed. I executed a simple example of fmincon along with the a custom ouputput function. Then I placed a break point and stepped in through the different functions that were being called just before my custom output function. It appears that the 'firstorderopt' variable is set in the file 'nlconst.m' at line 952 or 954 inside the 'callOutputAndPlotFcns' to a variable called 'optimerror'. This variable 'optimerror' is set at line 407 and is based on 'normgradLag' and 'normcomp' variables computed at line 404 and 405 respectively of the same file 'nlconst.m'. Using breakpoints and stepping into the file would help find the formula of calculating the 'firstorderopt'.
You can edit the file 'nlconst.m' using the following command
>> edit nlconst.m
Hope this helps.
  1 件のコメント
Pengfei
Pengfei 2015 年 10 月 1 日
Thank you very much! indeed what I need. Really appreciate that you actually try this.

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeIntroduction to Installation and Licensing についてさらに検索

製品

Community Treasure Hunt

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

Start Hunting!

Translated by