Hessian matrix is not positive definite with mpcqpsolver

4 ビュー (過去 30 日間)
ahmad shokair
ahmad shokair 2020 年 6 月 24 日
回答済み: 杨强 杨 2021 年 11 月 2 日
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?

回答 (1 件)

杨强 杨
杨强 杨 2021 年 11 月 2 日
Do you understand what cause this problem,I also face the same problem

カテゴリ

Help Center および File ExchangeNeuroimaging についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by