Please help me with Illegal operation: log( {complex affine} )

The bug happens in this code :

 R0(m,k,i,j)=log(A1(m,k,i)+sigma2)/log(2)- Rup(m,k,i,j);

where A(m,k,i,j) is a complex variable.
And the error is like this:

错误使用 cvx/log (line 64)
Disciplined convex programming error:
Illegal operation: log( {complex affine} ).

出错 try1 (line 66)
R0(m,k,i,j)=log(A1(m,k,i)+sigma2)/log(2)- Rup(m,k,i,j);

i am very new with CVX, and don’t know how to solve it. Can anyone help me?Thanks so so much

Even though it is not documented, a complex CVX expression is not allowed as argument of log. Nor of exp.

Thank you so much for replying. And i wonder if there is some alternative way to express log{complex} because the argument i use is complex…Thank you :slightly_smiling_face:

You would have to provide a more complete mathematical exposition of your optimization problem. The first step is, have you proved it is a convex optimization problem? if it is, then perhaps readers can suggest reformulation possibilities. if not, you either need to change to a different optimization problem to be solved or use some tool other than CVX. Why isn't CVX accepting my model? READ THIS FIRST!