Warning using fmincon function.

Hello! I get the following warning using the function fmincon: Matrix is close to singular or badly scaled. Results may be inaccurate. RCOND = 6.286202e-18. What can be the cause? Thanks!

1 件のコメント

Walter Roberson
Walter Roberson 2017 年 6 月 7 日
We need to see your code. Are you using inv() or / (not ./ but /) or \ operators?

回答 (1 件)

John D'Errico
John D'Errico 2017 年 6 月 7 日
編集済み: John D'Errico 2017 年 6 月 7 日

0 投票

No need to have used inv - fmincon will call backslash on its own. Therefor, if you see a singular matrix indication while using fmincon, fmincon probably generated it.
This is probably an indication that fmincon has gotten into trouble, that your problem is either poorly defined, or the problem itself is ill-posed, or terribly poorly scaled, or the starting values provided have gotten fmincon to a bad place, or fmincon might be diverging. Which of those it is, we cannot tell. Or it might be something else I did not think to add to that list.
It MIGHT help to see the code you are using, as well as any data. Well, it cannot hurt to see that information, as we might be able to then diagnose the issue.

この質問は閉じられています。

質問済み:

2017 年 6 月 6 日

閉鎖済み:

2021 年 8 月 20 日

Community Treasure Hunt

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

Start Hunting!

Translated by