My objective function is exponantial so i am using mosek solver. This type of error is occuring in code (“Pi” was previously used as a variable, conflicting with its use here as the name of a function or command.See “How MATLAB Recognizes Command Syntax” in the MATLAB documentation for details.)

This is my code,

while 1

count(1,i) = count(1,(i-1))+1;

cvx_begin quiet

cvx_solver mosek

variables Pi(n,1) Pj(n,1) %optimization variables

maximize(Mn-mu_n.*(1+exp(-an*(gnx.*(Pi(1,i)+Pj(1,i))-bn))))
subject to
Pi <= Pi_opt;
Pj <= Pj_opt;
qmx.*(Pi+Pj)<= Gamma_m;

cvx_end

Pi Pj

K = abs(Mn-mu_n.

*(1+exp(-an.*(gnx.

*(Pi(1,i)+Pj(1,i))-bn))));*

fprintf(‘value of K:%f\n’,K);

fprintf(‘value of Pix:%f\n’,Pi(1,i));

fprintf(‘value of Pjx:%f\n’,Pj(1,i));

if K < Delta

Phi_ERn(1,i) = Mn./(1+exp(-an.(gnx.

fprintf(‘value of K:%f\n’,K);

fprintf(‘value of Pix:%f\n’,Pi(1,i));

fprintf(‘value of Pjx:%f\n’,Pj(1,i));

if K < Delta

Phi_ERn(1,i) = Mn./(1+exp(-an.

*(Pi(1,i)+Pj(1,i))-bn)));*

fprintf(‘value of Phi_ERn:%f\n’,Phi_ERn(1,i));

break

else

mu_n1 = Mn./(1+exp(-an.(gnx.*(Pi(1,i)+Pj(1,i))-bn)));

fprintf(‘value of Phi_ERn:%f\n’,Phi_ERn(1,i));

break

else

mu_n1 = Mn./(1+exp(-an.

mu_n1x = abs(mu_n1);

mu_n = mu_n1x;

fprintf(‘value of updated mu_n:%f\n’,mu_n)

end

i = i+1;

end

end