I am trying to solve a geometric programming problem with cvx package in Matlab. Objective function is maximization, but inside it, I have to define a min function. When I try to run the code, I got this error
Error using cvx/mtimes (line 41) Inner matrix dimensions must agree.
Error in cvx/mrdivide (line 15) z = mtimes( x, y, 'rdivide' );
and the code is here:
cvx_begin gp
variables P_1 P_2
maximize ((D * (log2(P_1 * min(G_1/(np + (P_2 * G_2)))))) + log2((P_2 * G_3)/(np + (P_1 * G_3))))
subject to
P_2 <= P_max_Cell;
P_1 <= P_max_D2D;
P_2 * (G_3/(np + (P_1 * G_3))) >= C_th;
min(G_1/(np + (P_2 * G_2))) * P_1 >= D_th;
((np + (P_2 * G_2)) * min(G_1/(np + (P_2 * G_2)))) <= G_1; cvx_end
My previous problem has been solved, but i have another error that I now why it happens, but I don't know how to solve it. The error is:
Disciplined convex programming error: Cannot perform the operation: {log-convex} .* {log-concave}
It is belong to the last line of code. Can anyone help me toward this problem?