After solving the problem The cvx_status is solved but the equality constraints aren’t satisfied I mean for example after run the cvx when I put constraint 2 in command window I get 0. I don’t know why ?
after CVX is complete? Then of course the answer will be zero. This is a numerical solver, and you must expect that the solutions will be approximate. The likelihood that equality constraints are satisfied exactly is pretty much nil. You must take this fact into account when using the solutions in the rest of your application.
I am afraid you’re simply missing the reality of numerical solvers. Fire up MATLAB, and try this.
A = randn(10,10)
b = randn(10,1)
x = A \ b
A * x == b
In exact arithmetic, you would get all ones in that last computation. In practice, you never will. That does not mean the solver failed, though. It simply cannot guarantee an exact solution, though it will be quite close.