```
cvx_save_prefs
cvx_begin
cvx_solver mosek
variable W(M,M,K)
variables R(K,K) r(K) relax_IN_VB(K,L) relax_S1_lamda(K,L) relax_S2_lamda(K,L) tau_max(K) gammaa(K,L)
expressions LMI_S1(M+N_all+1,M+N_all+1,K,L) LMI_S2(M+N_all+1,M+N_all+1,K,L);
u=u_t;
Theta=diag(u);
epsilong=epsilong_rE+epsilong_BE;
SEE=0;
P=0;W_temp3=0;
for k=1:K
h_k(:,k)=h_Bk(:,k)+G'*Theta'*h_rk(:,k);
H_k(:,:,k)=h_k(:,k)*h_k(:,k)';
SSE=SEE+R(k,k)-tau_max(k);
end
for l=1:L
W_temp2=0;
E(:,l)=[h_rE(:,l)',h_BE(:,l)'];
for k=1:K
for s=k+1:K
W_temp2=W_temp2+W(:,:,s);
end
A(:,:,k)=[Theta*G*W_temp2*G'*Theta',Theta*G*W_temp2;...
W_temp2*G'*Theta',W_temp2];
a(:,:,k,l)=A(:,:,k)+relax_S1_lamda(k,l)*eye(M+N_all);
b(:,k,l)=A(:,:,k)'*E(:,l);
c(k,l)=E(:,l)'*A(:,:,k)*E(:,l)+noise-gammaa(k,l)-relax_S1_lamda(k,l)*epsilong;
LMI_S1(:,:,k,l)=[a(:,:,k,l) b(:,k,l);...
b(:,k,l)' c(k,l)];
right_up(k,l)=(exp(tau_max_t(k))-1)*gammaa(k,l)+gamma_t(k,l)*exp(tau_max_t(k))*...
(tau_max(k)-tau_max_t(k));
B(:,:,k)=[Theta*G*W(:,:,k)*G'*Theta',Theta*G*W(:,:,k);...
W(:,:,k)*G'*Theta',W(:,:,k)];
a0(:,:,k,l)=relax_S2_lamda(k,l)*eye(M+N_all)-B(:,:,k);
b0(:,k,l)=-B(:,:,k)'*E(:,l);
c0(k,l)=-E(:,l)'*B(:,:,k)*E(:,l)+right_up(k,l)-relax_S2_lamda(k,l)*epsilong;
LMI_S2(:,:,k,l)=[a0(:,:,k,l) b0(:,k,l);...
b0(:,k,l)' c0(k,l)];
end
end
maximize SEE
subject to
for l=1:L
for k=1:K
LMI_S1(:,:,k,l) ==hermitian_semidefinite(M+N_all+1);
LMI_S2(:,:,k,l) ==hermitian_semidefinite(M+N_all+1);
relax_S1_lamda(k,l)>0;
relax_S2_lamda(k,l)>0;
P=P+trace(W(:,:,k));
tau_max(k)*log2(exp(1))<=M_E;
end
end
P<=P_max
for j=2:K
for s=j:K
W_temp3=W_temp3+H_k(:,:,j)*W(:,:,s);
end
for k=1:j-1
pow_pos((exp(R(j,k))-1)*real(A_t(j,k)),2)+pow_pos((real(trace(W_temp3)+noise))/real(A_t(j,k)),2)<=...
2*real(trace(H_k(:,:,j)*W(:,:,k)));
R(j,k)>R(k,k);
end
end
cvx_end
if cvx_status(1)=='S' || cvx_status(3)=='a'
flag_w=1;
else
flag_w=0;
end
```

Thank you for your answer. I still have this error after installing cvx2.2. Here is my code.It may be a little cumbersome. Thank you very much for helping me.

These are various parameter value dimensions.