How I can fix the problem in CVX?

조회 수: 5 (최근 30일)
Khiem Nguyen
Khiem Nguyen 2021년 9월 25일
댓글: Walter Roberson 2021년 9월 26일
Hello everyone!
Can you help me with the problem? When I run the code here, it doesn't work right because matlab CVX does not perform divide.
M = 7;
Nt = 8;
L = 5;
Pmax = 40;
u = 0.5;
sigma = -70;
delta = -50;
SNRdB = 10;
gamma = 10.^(SNRdB/10);
Iota = 40;
h = zeros(Nt,M);
g = zeros(Nt,L);
for i=1:M
h(:,i) =sqrt(1/2)*(randn(Nt,1)+1i*randn(Nt,1)); % Nt antenna to 1 SR
end
for i=1:L
g(:,i) =sqrt(1/2)*(randn(Nt,1)+1i*randn(Nt,1)); % Nt antenna to 1 PU
end
H = (h*ctranspose(h));
G = (g*ctranspose(g));
cvx_begin
variable W(Nt,Nt)
variable theta
minimize(0);
subject to
0 >= abs(trace(W))-Pmax;
0 >= gamma*sigma + gamma*(delta/theta) - abs(trace(H*W));
0 >= abs(trace(G*W)) - Iota;
0 < theta < 1;
W >= 0;
cvx_end
-----------------------------------------------
This error appears:
  댓글 수: 5
Khiem Nguyen
Khiem Nguyen 2021년 9월 26일
Thank you very much
Walter Roberson
Walter Roberson 2021년 9월 26일
So possibly
0 >= gamma*sigma + gamma*delta*inv_pos(theta) - abs(trace(H*W));
?

댓글을 달려면 로그인하십시오.

답변 (0개)

카테고리

Help CenterFile Exchange에서 Programming에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by