How I can fix the problem in CVX?
Mostra commenti meno recenti
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 Commenti
Image Analyst
il 25 Set 2021
Modificato: Image Analyst
il 25 Set 2021
What are the sizes of gamma, delta, theta, H, and W? Some or all are matrices and can't do that. Maybe try ./ instead of /
Khiem Nguyen
il 25 Set 2021
Walter Roberson
il 25 Set 2021
gamma is constant scalar = 10
delta is constant scalar = -50
theta is scalar optimization variable
H is numeric 8x8 complex
W is 8x8 optimization variable
Khiem Nguyen
il 26 Set 2021
Walter Roberson
il 26 Set 2021
So possibly
0 >= gamma*sigma + gamma*delta*inv_pos(theta) - abs(trace(H*W));
?
Risposte (0)
Categorie
Scopri di più su MATLAB in Centro assistenza e File Exchange
Prodotti
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
