Formulate problem in CVX and using subgradient algorithm

You will not be able to treat E_ij as a variable. That makes the problem non-convex. FAQ: Why doesn’t CVX accept my problem? [READ THIS FIRST]