Cvx DCP error:%{real affine} .* {convex}

Hello,everyone ,I have a question about this.
a(m,n) is variable,which size is(M,N).D(m,n) is constant.

In my code,I express it as follows:


But there are some errors: Illegal expression:{real affine} .* {convex}
How shoud I solve it? thank you very much!

a*log(1+D/a) can be rewritten as -rel_entr(a,a+D)

I’ll let you deal with the indexing.

If you have access to Mosek, use that as solver, with CVX 2.2. Otherwise, install CVXQUAD’s exponential.m replacement CVXQUAD: How to use CVXQUAD's Pade Approximant instead of CVX's unreliable Successive Approximation for GP mode, log, exp, entr, rel_entr, kl_div, log_det, det_rootn, exponential cone. CVXQUAD's Quantum (Matrix) Entropy & Matrix Log related functions .

Thank you for your reply,Sir!
By the way,what do you mean by dealing with indexs?For a variable of size (M,N), the expression is a (m,n) is not true?
For the solver, I’m currently using SDPT3.I will change to Mosek.

I mean that I gave you the basic construct you need to enter this in CVX,. I leave the remaining details to you.

oh I got it.thank you very much!