Hi everyone, I met a trouble when i used the CVX tools. If you can give me some suggestion, i would be very pleasured. when i used CVX tool, i found that L_sumo can not be equal to the term tauo.*log(1+rho.*a_up_new) in the following codes. I can not figure out what happened in the process.

I can hardly express my gratitude to you for your help.

```
cvx_begin
variables u_x_new(N) u_y_new(N) L_tilde R_upper_k(K,N_t) z(K,N_t) lcomp(K,N_t-1) a_up_new(K,N_t)
expressions a_d(K,N_t) S_klnew(K,N_t) L_sumo(K,N_t) %L_off(K,N_k-1)
% expression L_sum_new(K,N)
maximize (L_tilde)
subject to
for n=1:1:N_t
(u_x_new(n+1)-u_x_new(n)).^2+(u_y_new(n+1)-u_y_new(n)).^2 <= S_max.^2;%%% speed constraint
end
u_x_new(1)==intial_x;
u_y_new(1)==intial_y;
u_x_new(N)==final_x;
u_y_new(N)==final_y;
for n=1:1:N_t-1
for k=1:1:K
lcomp(k,n)<=fC_k(k);
lcomp(k,n)>=tot;
end
end
for n=1:1:N_t
for k=1:1:K
z(k,n)>=0;
z(k,n)==(c_k(k,n)+2*S_kl(k,n)alpha(omega_x(k,n).*u_x_new(n+1)+omega_y(k,n).*u_y_new(n+1)));
R_upper_k(k,n)>=0;
2^(-R_upper_k(k,n))+rho*2^((-log(z(k,n)))/log(2)-R_upper_k(k,n))<=1;
S_klnew(k,n)= ((u_x_new(n+1)-x_k(k)).^2+(u_y_new(n+1)-y_k(k)).^2+H.^2);
((u_x_new(n+1)-x_k(k)).^2+(u_y_new(n+1)-y_k(k)).^2+H.^2) <=pow_p(a_up(k,n),-1)-(a_up_new(k,n)-a_up(k,n)).*pow_p(a_up(k,n),-2);%pow_pos(S_klnew(k,n),alpha)
a_up_new(k,n)>=0;
end
end
L_tilde>=0;
L_sumo=tauo.*log(1+rho.*a_up_new);
L_sumd=taud.*log(1+rho.*a_up_new);
lcomp(:,1)==0;
sum(sum(tauo.*log(1+rho.a_up_new)))>= L_tildelog(2); %tauo.*log(1+rho.*a_up_new)
sum(sum(taud.log(1+rho.a_up_new)))>=gammaL_tildelog(2);
a_d=taud.R_upper_k;
a_d(:,1)=0;
a_d(:,2)=0;
for n=1:1:N_k-1
for k=1:1:K
sum(lcomp(k,2:n+1))<=sum(L_sumo(k,1:n))/log(2);
end
end
sum(sum( lcomp))>= L_tilde;
for n=2:1:N_k
for k=1:1:K
sum(a_d(k,3:n+1))<=gammasum(lcomp(k,2:n));
end
end
cvx_end
```