Getting an Error regarding invalid quadratic form

I have faced with the following error running my program using cvx in Matlab:

Error using .*
Disciplined convex programming error:
Invalid quadratic form(s): not a square.

Error in * (line 36)
z = feval( oper, x, y );

Error in HW3_b (line 298)
L(rho(jj),jj)*V(jj) >= (P(rho(jj),jj))^2+(Q(rho(jj),jj))^2;

L, V, P, and Q are variables. The original form of the constraint was an equation. To make it relaxed, I used the inequality form of the constraint, but I faced this error. I was wondering what the source of the error is and how I can solve it.

Presuming L(rho(jj),jj) >= 0, V(jj) >= 0, this is a rotated second order cone constraint, which can be entered as
{[P(rho(jj),jj);Q(rho(jj),jj)],L(rho(jj),jj),V(jj)} == rotated_lorentz(1)

If it is not the case that L(rho(jj),jj) >= 0 and V(jj) >= 0, this would be a non-convex constraint, and could not be entered in CVX.

1 Like

Yes, they were non-negative.
I applied the command and it worked.
I really appreciate your prompt and precise help.