Non-overloaded subscripting can produce only one result ERROR

I was trying to program an example that uses a successive approximation method to convert a complementary GP to a GP. This was just a trial of a first iteration. I have not added the constraints yet. I tried running it and got this:

Non-overloaded subscripting can produce only one result

Error in cvxprob/solve (line 247)
[ x, status, tprec, iters2, y, z ] = shim.solve( [ At, Anew2 ], [ b ; bnew ], c, cones,
true, prec, solv.settings, eargs{:} );

Error in cvx_end (line 88)
solve( prob );

Error in Example4 (line 41)
cvx_end

% Parameters
u = 3; % number of transmitters and receivers
Pmin = zeros(u,1); % minimum power at the transmitter i
Pmax = 1e-3*[3 4 5]’; % maximum power at the transmitter i
Pout_max=0.01ones(u,1); %maximal outage probabilities
Rmin=1e3
[100 600 1000]’;
P=0.5*Pmax; %initial vector P_0

% path gain and Rayleigh Fading GijFij matrix
GF = ChannelGenerator2(u);
a=approximation(P,GF);
% variables are power levels
cvx_begin gp
variable P(u)
%individual terms in objective’s posynomial denominator
t1=(GF(1,2)*GF(2,1)*GF(3,1)+GF(1,3)*GF(2,1)*GF(3,2)+GF(1,1)*GF(2,2)*GF(3,3))*P(1)*P(2)*P(3);
t2=(GF(1,2)*GF(2,3)*GF(3,1)+GF(1,3)*GF(2,3)*GF(3,2)+GF(1,3)*GF(2,2)*GF(3,3))P(2)(P(3)^2);
t3=(GF(1,2)*GF(2,3)GF(3,2))(P(2)^2)*P(3);
t4=(GF(1,3)*GF(2,1)*GF(3,1)+GF(2,3)*GF(1,1)*GF(3,3))P(1)(P(3)^2);
t5=(GF(2,1)*GF(1,1)GF(3,3))(P(1)^2)*P(3);
t6=(GF(1,2)*GF(2,1)*GF(3,2))P(1)(P(2)^2);
t7=(GF(1,3)*GF(2,3)GF(3,1))(P(3)^3);
numer=(GF(1,2)*GF(2,1)*GF(3,1)+GF(1,3)*GF(2,1)*GF(3,2))*P(1)*P(2)*P(3)…
+(GF(1,2)*GF(2,3)*GF(3,1)+GF(1,3)*GF(2,3)*GF(3,2))P(2)(P(3)^2)…
+(GF(1,2)*GF(2,3)GF(3,2))(P(2)^2)*P(3)+(GF(1,3)GF(2,3)GF(3,1))(P(3)^3)…
+(GF(1,3)GF(2,1)GF(3,1))P(1)(P(3)^2)+(GF(1,2)GF(2,1)GF(3,2))P(1)(P(2)^2);
%monomial approximation
denom=((t1/a(1))^a(1))
((t2/a(2))^a(2))
((t3/a(3))^a(3))
((t4/a(4))^a(4))…
((t5/a(5))^a(5))((t6/a(6))^a(6))
((t7/a(7))^a(7));
minimize( numer/denom )
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

What could the problem be? Is it ok to manipulate expressions with the optimization variable before putting them in the objective function?

1 Like

I also have the same problem.