Divide both sides of the constraint by B, then take 2 to the power of both sides to get rid of log2, then multiply both sides of that by what is the denominator inside what was the log2. I believe this results in an affine equality. which is the constraint you should enter.

In the future, please copy and paste code into your post, and use the Preformatted text on it.

Hi, Mark, thanks for your reply. I have revised the constraint according to your suggestion, that is (2^(r_iA/B))*(n_A*n2_m+n_A*g_im*p_i)==(n_A*n2_m+n2_m*h_iA*p_i)

But CVX still reports errors. The errors reported are

What is r_iA? I presumed it is a number (constant), but I don’t see it anywhere in your image. If it is not a constant, perhaps the constraint is non-convex.

Also, your input data has horrible values such as 10^(-28). That is not good for solvers. you need to improve scaling so that non-zero input data is much close in magnitude to 1.

Based on that, I will declare this problem to be non-convex.,

In the future, please show the code which resulted in the error message you show, not a different code. The code you show does not declare r_iA as a variable.

What is the meaning of the third constraint?
You may try to reformulate it as an inequality, and then it should be hopeful to convert it to a convex one.