I have an SDP problem in a for-loop. The size of the loop is 300, i.e., I’m solving 300 (independent) SDP problems with 300 (independent) input values. I have noticed that when I run the for-loop from 1 to 300 in one go, CVX (with both sedumi and sdpt3) returns a failed status and nan as optimal value for some of the iterations between 200 to 300. However, when I run the same for-loop from 200 to 300 (as opposed to from 1 to 300), then for all iterations CVX returns solved with a feasible solution. Why is that?
PS. I call a function in the for-loop from which I call CVX.