I have been following an example from Boyd’s book. The code is attached below:

```
% problem constants
n = 5; % number of transmitters and receivers
sigma = 0.5*ones(n,1); % noise power at the receiver i
Pmin = 0.1*ones(n,1); % minimum power at the transmitter i
Pmax = 5*ones(n,1); % maximum power at the transmitter i
SINR_min = 2; % threshold SINR for each receiver
% path gain matrix
G = [1.0 0.1 0.2 0.1 0.0
0.1 1.0 0.1 0.1 0.0
0.2 0.1 2.0 0.2 0.2
0.1 0.1 0.2 1.0 0.1
0.0 0.0 0.2 0.1 1.0];
% variables are power levels
cvx_begin gp
variable P(n)
% objective function is the total transmitter power
minimize( sum(P) )
subject to
% formulate the inverse SINR at each receiver using vectorize features
Gdiag = diag(G); % the main diagonal of G matrix
Gtilde = G - diag(Gdiag); % G matrix without the main diagonal
% inverse SINR
inverseSINR = (sigma + Gtilde*P)./(Gdiag.*P);
% constraints are power limits and minimum SINR level
Pmin <= P <= Pmax;
inverseSINR <= (1/SINR_min);
cvx_end
fprintf(1,'\nThe minimum total transmitter power is %3.2f.\n',cvx_optval);
disp('Optimal power levels are: '), P
```

I am trying to solve a similar problem in Cvx but it gives me “Disciplined convex programming error:

Invalid constraint: {log-concave} <= {real constant}”. I know that the RHS is a constant (not convex), but so it is in the above example, but why does it runs smoothly? This is my code I am trying to execute:

```
N = 3;
A = [0,0.01,0.81;0.01,0,1.45;0.81,1.45,0];
I = 20;
Pmin = 0.1*ones(N,1);
Pmax = 1*ones(N,1);
cvx_begin gp
variable P(N)
minimize (norm(A * P,2))
subject to
R = A' * P;
Pmin <= P <= Pmax;
1./R <= (1/I);
cvx_end
```