## I have a variable that is Matrix X positive semi-definite with size 2Nx2N. and 2*N matrices that are M1_1,M1_2,…,M1_N and M2_1, M2_2,…,M2_N. Is this possible to write a loop like this:*

for n=1:N

trace(M1_nX)==trace(M2_n*X);

end

Because everytime i added this contraints to cvx, my problem does not work:

`Calling SDPT3 4.0: 8861 variables, 3240 equality constraints

For improved efficiency, SDPT3 is solving the dual problem.

for n=1:N

trace(M1_n

num. of constraints = 3240

dim. of sdp var = 80, num. of sdp blk = 1

dim. of linear var = 5601

dim. of free var = 20 *** convert ublk to lblk

SDPT3: Infeasible path-following algorithms

## version predcorr gam expon scale_data

HKM 1 0.000 1 0

it pstep dstep pinfeas dinfeas gap prim-obj dual-obj cputime

## 0|0.000|0.000|1.6e+05|7.4e+01|1.6e+26| 1.155527e+24 0.000000e+00| 0:0:07| spchol 1 2

1|0.024|0.000|4.7e+13|7.4e+01|2.2e+26| 1.155396e+23 -5.734178e+10| 0:0:15|

sqlp stop: primal or dual is diverging, 3.9e+15

## number of iterations = 1

Total CPU time (secs) = 14.62

CPU time per iteration = 14.62

termination code = 3

DIMACS: 2.2e+14 0.0e+00 2.9e+03 0.0e+00 1.0e+00 1.9e+03

Status: Failed

Optimal value (cvx_optval): NaN`

Another point: when i change to: Trace(M1_n*X) <= Trace(M2_n*X). It works but that is not i want.

Thank you!