How I can fix the problem in CVX?
조회 수: 5 (최근 30일)
이전 댓글 표시
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
Walter Roberson
2021년 9월 26일
So possibly
0 >= gamma*sigma + gamma*delta*inv_pos(theta) - abs(trace(H*W));
?
답변 (0개)
참고 항목
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!