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 Commento

We need to see your code. Are you using inv() or / (not ./ but /) or \ operators?

Risposte (1)

John D'Errico
John D'Errico il 7 Giu 2017
Modificato: John D'Errico il 7 Giu 2017

0 voti

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.

Questa domanda è chiusa.

Richiesto:

il 6 Giu 2017

Chiuso:

il 20 Ago 2021

Community Treasure Hunt

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

Start Hunting!

Translated by