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