Channel optimal problems

sorry to cause you trouble,but i cant solve the problem.i want to optimal the question is this
t_(i,j)=D_(i,j)/(B_(i,j) 〖log〗_2 (1+P_(i,j)/(N0*B_(i,j) )) ),and i prove it is convex if i simply optimal the pij and bij ,but i cant deal with it,so i want to divide it to two questions,pij has done use
minimize(sum(sum(d1.*inv_pos(b1.*(log(1+p1.*inv_pos(N0.*b1)/log(2)))))))
but i try my best to optimal bij,because it in log and in 1/x,so i should use inv_pos and rel_entr,but it always failed,%minimize(sum(sum(d1.*(inv_pos(b1.*p1.*(rel_entr(N0.*b1,N0.*b1+p1)+rel_entr(N0.*b1+p1,N0.*b1)))))))cant work.by the way,i want optimal dij ,but it always <0,though i use limitations,how can i produce a variable matrix that all numbers>=0,i use cvx first time,these problems really annoyed me a looooot!pease,thank you for your any advices,if you need all code to deal the problem ,please let me know

Please clearly show the problem you want to solve, including telling us which symbols are optimization (decision) variables, and which are input data. Please show whatever code you have, including all error messages and warnings, as well as CVX and solver output, f there is any. Use Preformatted text icon for code, so that it displays properly.

i have 2 problems and i show them
but i can only put 1 page,so i put all problem into it,sorry

this is my goal,to minimize it.and bij dij pij is my variables,i can prove that bij and pij both convex,but i dont know to optimal them together ,so i divide them and i can optimal pij.but for bij

b1=[0.5,0.5;
0.5,0.5];
bmax=2;
d1=[2,2;3,3];
p1=[0.5,0.5;0.5 0.5];
N0=0.1;
cvx_begin
variable b1(2,2) %设定变量可分配带宽
%minimize(sum(sum(d1.*p1.*inv_pos((rel_entr(N0.*b1,N0.*b1+p1)+rel_entr(N0.b1+p1,N0.b1))))))
minimize(sum(sum(d1.
(inv_pos(b1.
(-rel_entr(1,inv_pos(N0.*b1).*p1)))))))
subject to
for i=1:2
sum(b1(:,i))==bmax;
end%make bij limits
cvx_end
but it shows that

and i want to optimal pij and dij one by one,but there still some accidents,the limitations cant work,but it no wrong,the code is
b1=[2,2;
2,2];
bmax=2;
d1=[0.5,0.5;0.5 0.5];
p1=[0.5,0.5;0.5 0.5];
N0=0.1;
lame=1e-3;
for q=1:500
d11=d1;
p11=p1;
cvx_begin
variable p1(2,2) %设定可分配功率
minimize(sum(sum(abs(d1).inv_pos(b1.(log(1+p1.*inv_pos(N0.*b1)/log(2)))))))
subject to
for i=1:2
sum(p1(i,:))==2;
end%设置功率限制函数
cvx_end
cvx_begin
variable d1(2,2) %设定可分配传输总量
%minimize(sum(sum(d1.*inv_pos(b1.*log(1+p1.*inv_pos(N0.*b1))))))
%minimize(sum(sum(d1.*p1.*inv_pos((rel_entr(N0.*b1,N0.*b1+p1)+rel_entr(N0.*b1+p1,N0.*b1))))))
minimize(sum(sum(d1.inv_pos(b1.(log(1+p1.*inv_pos(N0.*b1)/log(2)))))))
subject to
for i=1:2
sum(b1(:,i))==bmax;
end%设置带宽限制函数
for i=1:2
sum(p1(i,:))<=bmax;
end%设置功率限制函数
for i=1:2
sum(d1(i,:))==bmax;
end%设传输文件限制函数
for i=1:2
for t=1:2
d1(i,t)>=0;
end
end%设传输文件限制函数
cvx_end
for i=1:2
for t=1:2
if(d1(i,t)<0)
break;
end
end
end%设传输文件限制函数
c1=(p1-p11).^2;
c2=(d1-d11).^2;
d12=sqrt(sum(c1(:)));
d2=sqrt(sum(c2(:)));
zx=power(d12+d2,2);
if (zx<=lame)%设置循环跳出条件
break;
end
end
but in the end,p1is

and d1 is

before i add abs(d1) ,the d1 even perform<0
as you can see ,they all bigger than bmax(2)
so thanks a lot for you

that is what i have,if you are not busy,please give me some advices

I’ll leave out the subscripts.

t = log(2)*D*inv_pos(-rel_entr(B,B+P/N0))

thanks for your help,and i also want to know how it works.can you give me some guidances that this special functions in cvx link with normal functions?can you put some docx or picture or github links in the reply?
because in log(2)Dinv_pos(-rel_entr(B,B+P/N0))
i dont know why * log(2),and in division,there only p and n0,sorry to interupt.thanks alot!

x*log(1+y/x) = -rel_entr(x,x+y)

x*log2(1+y/x) = -rel_entr(x,x+y)/log(2)

inv_pos(x*log2(1+y/x)) = inv_pos(-rel_entr(x,x+y)/log(2))

Read CVX Users’ Guide

Use MATLAB’s help for cvx commands, such as
help rel_entr.

Read posts on this forum and use its search box.

thanks a lot,your help are important for me