# Ans =cvx empty expression (0x0 matrix),

Hello everyone, I’m a beginner in learning cvx and encountered this problem when I first started coding. Could anyone tell me what might have caused this issue? I would appreciate any help. Thank you.The problem :ans =cvx empty expression (0x0 matrix),
The question and my code

Please show all the solver and CVX output.

One obvious problem, which will eventually trigger an error message, is that `log2` is applied to a CVX expression argument. That is not supported. iI `x` is a CVX expression, use `log(x)/log(2)` instead of `log2(x)`

``````    deta = 0.01;
gamma=10^(-13);
v = 3*10^(-11);
f_loc = 10^(9);
f_ES = 10^(10);
gesi_loc = 10^(-1);
gesi_ES = 10^3;
tao=0.1;
sigge_pre=10^(1);
r=pi/sqrt(3);
B = 10^6;
d = 100;
L_dB = 30 + 30*(log(d)/log(10));
L_linear = 10^(L_dB/10);
sigma = sqrt(0.5);
hm = (sigma/sqrt(2)) * (randn(1, 1) + 1i*randn(1, 1));
hm = abs(hm);
hm_amplitude_with_loss = hm / L_linear;
d1 = 100;
p1 = 1;
alpha1 = 2;
h_small_scale1 = (randn(1, 1) + 1i*randn(1, 1)) * 0.1;
beta1 = p1 * d1^(-alpha1);
simplified_channel_amplitude1 = h_small_scale1 * sqrt(beta1);
pr=10;
A=(2*sigge_pre*sigge_pre*r*r*B*B*B*simplified_channel_amplitude1*v*pr)/(gamma);
B=hm_amplitude_with_loss*pm/(gamma+hm_amplitude_with_loss*pr);
``````

cvx_solver Mosek
cvx_begin
% variables G_cac a(K,N,M);
variables pm z;
minimize(z);
subject to
z>=(((gesi_loctaodeta)/(2f_locv))(log(1+A)/log(2)))-(((gesi_loctaoB)/(f_loc))(log2(1+B)/log(2)));
z>=(((gesi_EStaoB)/(f_ES))*(log(1+B)/log(2))+tao;
pm<=10;

cvx_end

When I run my program, this is all the content displayed in the window.

Have you tried running an example in the CVX Users’ Guide? Something should be written to the display.

That said, it looks like the numerical scaling is very bad. You should try to choose units so that all non-zero input data is within s small number of orders of magnitude of 1.