Invalid quadratic form

The error message description is not as clear as perhaps it could be. This error message is not due to dimensional incompatibility (number of rows and columns), but does indicate a violation of CVX’s DCP rules. In particular, 2*R*C*E.*PB violates the rule prohibiting multiplication of two different CVX variables or expressions, in this case, E and PB.

If he constraint E-sqrt(E.^2-2*R*C*E.*PB)<=Imax*R*sqrt(2*C*E*nb) is convex, it will need to be reformulated. Have you proven it is convex?

Until you show otherwise, I will mark this problem as non-convex.