How I can fix the problem in CVX?

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 Comments

Image Analyst
Image Analyst on 25 Sep 2021
Edited: Image Analyst on 25 Sep 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 /
I've read http://cvxr.com/cvx/doc/CVX.pdf and i'know that Matlab_cvx not support square, devide calculator. But CVX replace that calculator in table below.
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
Thank you very much
So possibly
0 >= gamma*sigma + gamma*delta*inv_pos(theta) - abs(trace(H*W));
?

Sign in to comment.

Answers (0)

Categories

Find more on MATLAB in Help Center and File Exchange

Asked:

on 25 Sep 2021

Commented:

on 26 Sep 2021

Community Treasure Hunt

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

Start Hunting!