Hessian matrix is not positive definite with mpcqpsolver
4 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
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?
0 comentarios
Respuestas (1)
杨强 杨
el 2 de Nov. de 2021
Do you understand what cause this problem,I also face the same problem
0 comentarios
Ver también
Categorías
Más información sobre Neuroimaging en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!