"Warning: Imaginary parts of complex X and/or Y arguments ignored" in fminserach and optimtool
8 ビュー (過去 30 日間)
古いコメントを表示
Dear all,
I am trying to fit a curve to experimental data by use of "optimtool" and "fminsearch".
But I receive a warning which says " Imaginary parts of complex X and/or Y arguments ignored". I have this warning from the first iteration.
Any idea to solve this warning is appreciated. Thanks in advance Best regards Victor
0 件のコメント
採用された回答
Walter Roberson
2012 年 3 月 5 日
If your fitting inherently involves imaginary quantities, then please note:
fminsearch only minimizes over the real numbers, that is, x must only consist of real numbers and f(x) must only return real numbers. When x has complex variables, they must be split into real and imaginary parts.
2 件のコメント
Walter Roberson
2012 年 3 月 5 日
Beware of log vs log10
See also
http://matlab.wikia.com/wiki/FAQ#Why_is_0.3_-_0.2_-_0.1_.28or_similar.29_not_equal_to_zero.3F
その他の回答 (1 件)
Sean de Wolski
2012 年 3 月 5 日
Evaluate your function at the initial values you provide. Is the result complex? If so, that's the reason for the warning. We can't be of much more assistance without seeing reproduction steps.
0 件のコメント
参考
カテゴリ
Help Center および File Exchange で Problem-Based Optimization Setup についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!