cvx_begin
variables sita_d(M,K) R_dd(K);
maximize(sum(R_dd))
subject to
constr = uildConstraints(M,K,sita_d,erfa1,erfa2,R_dd,Gamma_uc,BETAA_uc)
cvx_end
the following is constrain function
for m=1:M
y1(m)=(Gamma_uc(m,:)*sita_d(m,:)’);
end%
for k=1:K
q1(k)= (BETAA_uc(:,k)’*y1’)^2+noise_p^2; %concave
q2(k)=(Gamma_uc(:,k)’*sqrt(sita_d(:,k))) ;%concave
end
for k=1:K
c2 = [ R_dd(k)<=log(1+(q2(k))/(q1(k)))];
end
constr = [c2];