Hessian matrix is not positive definite with mpcqpsolver
    4 visualizzazioni (ultimi 30 giorni)
  
       Mostra commenti meno recenti
    
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 Commenti
Risposte (1)
  杨强 杨
 il 2 Nov 2021
        Do you understand what cause this problem,I also face the same problem
0 Commenti
Vedere anche
Categorie
				Scopri di più su Neuroimaging in Help Center e File Exchange
			
	Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!

