Problem with equality constraints

73 views
Skip to first unread message

SP

unread,
Dec 9, 2013, 1:53:38 AM12/9/13
to yal...@googlegroups.com
Hi, Johan

I tried the following simple code to test equality constraint.
------------------------------------------------------------------------------------------------
P = sdpvar(4,4,'full')  % define a 4 by 4 matrix
C = [sum(P,2)==1]; % row sum equals to 1
solvesdp( C, norm(P-eye(4),2)) % minimize the 2-norm P - I
PP = double(P)
------------------------------------------------------------------------------------------------
Matlab resutls: 

 Result:  infeasibility

 The LMI constraints were found INFEASIBLE
PP =
   NaN   NaN   NaN   NaN
   NaN   NaN   NaN   NaN
   NaN   NaN   NaN   NaN
   NaN   NaN   NaN   NaN

Intuitively, the optimal value P should be identity matrix. If I remove the equality constraint

solvesdp( [], norm(P-eye(4),2)) % minimize the 2-norm P - I

It gives the correct answer, i.e., P = I.

Do I code the equality constraint wrongly? How shall I fix the problem? Thanks in advance. 

Johan Löfberg

unread,
Dec 9, 2013, 1:56:07 AM12/9/13
to yal...@googlegroups.com

SP

unread,
Dec 9, 2013, 2:17:35 AM12/9/13
to yal...@googlegroups.com
I installed Sedumi, and the problem is resolved. Thanks so much for your help!! 
Reply all
Reply to author
Forward
0 new messages