Hessian matrix is not positive definite with mpcqpsolver

4 vues (au cours des 30 derniers jours)
ahmad shokair
ahmad shokair le 24 Juin 2020
I'm trying to solve a QP problem using mpcqpsolver function within a bigger code.
When I run the code, sometimes I get the following error (and sometimes not):
Error using mpcqpsolver (line 125)
Hessian matrix is not positive definite.
J = M'*M;
r = [beta;alpha];
c = M'*r;
[L,p] = chol(J,'lower');
Linv = inv(L);
opt = mpcqpsolverOptions;
[z,status] = mpcqpsolver(Linv,c,[],zeros(0,1),[],zeros(0,1),false(0,1),opt);
where M is a rectangular matrix, alpha and beta are vectors. I dont have any constraints.
Now J, the Hessian, is by definition posetive definite (J=M'*M) . To make sure, I check p for being equal to zero, and the eigen values are all positive. even after all those checks, I'm getting this error.
Any ideas on what is going wrong?

Réponses (1)

杨强 杨
杨强 杨 le 2 Nov 2021
Do you understand what cause this problem,I also face the same problem

Catégories

En savoir plus sur Neuroimaging dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by