Hessian matrix is not positive definite with mpcqpsolver
4 views (last 30 days)
Show older comments
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 Comments
Answers (1)
杨强 杨
on 2 Nov 2021
Do you understand what cause this problem,I also face the same problem
0 Comments
See Also
Categories
Find more on Neuroimaging in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!