FMINCON: Error message

Hi- I'm getting below error message while running fmincon. Can someone please advice?
Thanks.
Warning: Matrix is close to singular or badly scaled. Results may be inaccurate. RCOND = 1.433491e-16.
> In C:\Program Files\MATLAB\R2014a\toolbox\optim\optim\private\backsolveSys.p>backsolveSys at 17
In C:\Program Files\MATLAB\R2014a\toolbox\optim\optim\private\solveAugSystem.p>solveAugSystem at 22
In C:\Program Files\MATLAB\R2014a\toolbox\optim\optim\private\projConjGrad.p>computeProjResidual at 158
In C:\Program Files\MATLAB\R2014a\toolbox\optim\optim\private\projConjGrad.p>projConjGrad at 94
In C:\Program Files\MATLAB\R2014a\toolbox\optim\optim\private\tangentialStep.p>tangentialStep at 35
In C:\Program Files\MATLAB\R2014a\toolbox\optim\optim\private\computeTrialStep.p>computeTrialStep at 103
In C:\Program Files\MATLAB\R2014a\toolbox\optim\optim\barrier.p>barrier at 357
In fmincon at 818

Answers (1)

Alan Weiss
Alan Weiss on 13 Sep 2016

1 vote

This warning message comes from the 'interior-point' algorithm. Internally, it is running into some sort of singularity related to your constraints, but I don't understand the issue in any detail.
There are two quick things I would try:
  1. Use a different start point x0 -- maybe the solver will avoid the singularity.
  2. Try the 'sqp' algorithm, which uses a different method.
If these steps don't help, then it might be worthwhile to check your constraints to see if some are redundant or conflicting.
Good luck,
Alan Weiss
MATLAB mathematical toolbox documentation

1 Comment

Note that fmincon cannot be used for functions which have singularities or which are not differentiable, as they require Jacobians to be either directly provided or to be estimated.

Sign in to comment.

Asked:

on 13 Sep 2016

Commented:

on 13 Sep 2016

Community Treasure Hunt

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

Start Hunting!