above all is my code and the error disciplined as:Cannot perform the operation: {real affine} ./ {real affine}.I have do it for some days and remain this problem.I need help,thanks
Thank you, Mark. I have changed my code as your suggestion, and the current optimization function is follow:
1/log(2)(omega_cW*(-rel_entr(arf_c,arf_c+P_cg_cb/(NW)))+omega_dW(-rel_entr(arf_d,arf_d+P_dg_dd/(NW))))-lambda(k)(P_c+P_d+2P_0)
But something else is now happening, when the code is run, some other errors were made, such as
Disciplined convex programming error:
Illegal operation: {concave} - {complex affine}
or
Disciplined convex programming error:
Cannot perform the operation: {invalid} .* {real affine}
Look at the complex affine expression? Why do you have complex numbers? Should you?
Invalid probably happens in 2nd or later outer iteration (value of k) when a previous CVX problem was not successfully solved, and therefore optimal value from the previous iteration was NaN.
The input numbers to your fist iteration might be horrible, and then perhaps get worse. Your crude Successive Convex Approximation, which does not use line search or trust region for safeguarding, may not converge to anything, let alone a local or global optimum of your original problem. You may be better off using a non-convex nonlinear optimizer under YALMIP. And you still need to improve the scaling of input data.