CVX is not wrong. Unlike inequality constraints, the sign of the dual variable of an equality constraint (your first constraint) depends on convention, so either 200 or -200 could be correct. See Unexpected result .

Just negate CVX’s output. Mark is correct, the sign of the equality constraints depends on convention. But CVX uses the same convention for equality constraints every time, so just change your code this once and be done.