New to yalmip and I am using the following code to test how yalmip works to solve sdp problem:
P = sdpvar(3,3);
cons = [P >= 0,P(2,2)==1];
options = sdpsettings('Solver','Sedumi');
obj = [P(1,1)+P(1,3)];
solvesdp(cons,obj,options);
PP = double(P)
PP(1,1)+PP(2,3)
and the results are
PP =
1.2900 0.0000 -2.2900
0.0000 0.0000 0.0000
-2.2900 0.0000 5.8700
ans =
1.2900
I am just too curious about the results, in the constraints, I have P(2,2)==1, however, in the results, PP(2,2)=5.87, which is not 1, why does this happen?? Anyone can help?