Processing of NaN or Inf function evaluations by fminbnd

1 回表示 (過去 30 日間)
Mark Stone
Mark Stone 2020 年 2 月 27 日
コメント済み: Mark Stone 2020 年 2 月 28 日
How are NaN or Inf function evaluations handled by fminbnd?
Per https://www.mathworks.com/help/matlab/ref/fminbnd.html , the default 'off' for FunValCheck allows fminbnd to proceed when the objective function returns a value that is complex or NaN. Under this default setting, how exaclty does it proceed when NaN is retunred? If Inf is returned by the function evaluation, does the algorithm proceed the same way as if NaN is retunred by the function evaluation?
I am interested in definitive answers, even if only partial, not speculation. Thanks.
  2 件のコメント
Matt J
Matt J 2020 年 2 月 28 日
編集済み: Matt J 2020 年 2 月 28 日
I think the only why to determine that definitively is by studying the complicated innards of fminbnd.m. However, it would be a simple enough test to compare two versions of the same function -- one which returns Infs and one which returns a complex value in the same locations -- to see if they travel the same iteration sequence. If the iteration sequences are identical, I would probably be convinced that they were processed the same.
Mark Stone
Mark Stone 2020 年 2 月 28 日
Thanks. How stupid of me not to check for "existence" of source code. I was assuming the source code was not available to users. I will study the source code, which sure enough is in my MATLAB installation.

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

回答 (0 件)

カテゴリ

Help Center および File ExchangeFinancial Toolbox についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by