0

I want to use Yalmip in Matlab for solving a sdp problem,

min  X11+X13
s.t. X22=1
     X is positive semidefinite 

Following is the code

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)

results are shown below

PP =

1.2900    0.0000   -2.2900
0.0000    0.0000    0.0000
-2.2900    0.0000    5.8700

ans =
1.2900

I am quite curious about the results, I've had the constraint P(2,2)==1, while in the final results, P(2,2)=5.87, why does this happen? Any one can help?

ilovecp3
  • 2,825
  • 5
  • 18
  • 19
  • Answered on the YALMIP forum where the question also was asked. (Problem is trivially unbounded and the solvers has returned an error code indicating this, hence the values have no relevance) – Johan Löfberg Mar 31 '14 at 06:37

1 Answers1

0

yalmip assumes symmetrical decision matrix, P = sdpvar(3,3,'full') will do better