Hi, here is the function and constraints that I’m going to maximize
cvx_begin
variable v_1_1
variable v_1_2
variable v_2_1
variable v_2_2
variable v_3_1
variable v_3_2
variable v_4_1
variable v_4_2
maximize( (v_1_1*v_2_1 + v_1_2*v_2_2)*w(1,2) + (v_3_1*v_4_1 + v_3_2*v_4_2)*w(3,4) + (1-
(v_1_1*v_3_1 + v_1_2*v_3_2))*w(1,3) + (1-(v_1_1*v_4_1 + v_1_2*v_4_2))*w(1,4) + (1-
(v_2_1*v_3_1 + v_2_2*v_3_2))*w(2,3) + (1-(v_2_1*v_4_1 + v_2_2*v_4_2))*w(2,4) )
subject to
v_1_1 + v_1_2 <= 1
v_2_1 + v_2_2 <= 1
v_3_1 + v_3_2 <= 1
v_4_1 + v_4_2 <= 1
v_1_1 + v_1_2 + v_2_1 + v_2_2 + v_3_1 + v_3_2 + v_4_1 + v_4_2 <= 4
v_1_1 >= 0
v_1_2 >= 0
v_2_1 >= 0
v_2_2 >= 0
v_3_1 >= 0
v_3_2 >= 0
v_4_1 >= 0
v_4_2 >= 0
v_1_1 <= 1
v_1_2 <= 1
v_2_1 <= 1
v_2_2 <= 1
v_3_1 <= 1
v_3_2 <= 1
v_4_1 <= 1
v_4_2 <= 1
cvx_end
However i got the following error
Error using .* (line 262)
Disciplined convex programming error:
Invalid quadratic form(s): not a square.
Error in * (line 36)
z = feval( oper, x, y );
Is my function not convex? is there something i can do to fix this?
Thanks in advance