How to express the following function in cvx


(Hoàng Quang Tuyên) #1

I’m trying to implement in cvx the following concave function
log2[(a1*x+1)(a2*x+a3*y+1)+a2*x*a3*y]

where a1,a2,a3 are constants.
But cvx reports the error:
Error using times>times_q (line 84)
Disciplined convex programming error:
Invalid quadratic form(s): not a square.


(Mark L. Stone) #2

Please show your CVX code. I don’t know what your variable declarations are. Also, please provide the values of a1, a2, a3. When you do so, please use the Prefromatted text icon for your code so that it displays properly.

In any event, please read Why isn't CVX accepting my model? READ THIS FIRST! . Your first job is to prove that your expression is indeed concave. If you have done so, then forum readers might be able to suggest reformulations which would be accepted by CVX.