Conversion to double from cvx is not possible

You are using Rates as an expression, after first having defined it as a MATLAB (double) variable. This is neither allowed nor necessary. See http://cvxr.com/cvx/doc/basics.html#assignment-and-expression-holders . Had you read that, you would have seen discussion of the exact error message you received.

Either

delete the line Rate = zeros(10,10);

or

change it to expression Rate(10,10); and move it to someplace after cvx_begin and before the for loops.

or

change it to Rate = cvx(zeros(10,10));

or

remove all instances of Rate and instead use
log(1+(p(i)*((distance(i,j)).^(-pathloss)))) >= Rate_min(i,j)

Note: the usage of cvx() doesn’t seem to be in the CVX Users’ Guide.

3 Likes