Hi, I am trying to use cvx instead of Yalmip for solving my LMI problem. I have my opt problem formulated in yalmip as follows:
X = sdpvar(n,n); L = sdpvar(1,n,'full' ); mat = [X [A*X - B*L;L;X]';[A*X - B*L;L;X] blkdiag(X,inv(R),inv(Qx))] optimize(mat >= 0, -trace(X)) K_f = value(L)*inv(value(X))
However, when I code it in cvx the K_cvx obtained is not the same as K_f.
cvx_begin variable X(n,n) variable L(1,n) minimize (-trace(X)) subject to [X [A*X-B*L ; L; X]';[A*X-B*L ; L; X] blkdiag(X,inv(R),inv(Qx))] >= 0 cvx_end K_cvx = L*inv(X)
The code is quite simple, so I guess they are equivalent, but there is something wrong. Do you have any hints?