How to express x'y in cvx


(ly) #1

In my problem , I have two variables, variable x(1,n) and vaiable y(1,n),respectively,
and I have a constraint ,namely the sum of the product of the corresponding elements in the two vectors is greater than 0,
sum(x.y)>=0;
But the program went wrong
错误使用 .
(line 262)
Disciplined convex programming error:
Invalid quadratic form(s): not a square.

How should I handle such an expression in cvx?


(Erling D.Andersen) #2

Please show us a a proof that your model is convex. (Hint: It is not and therefore you cannot use CVX.)