I am going to write the code about this formula,but it has some problems,hoping someone can teach me how to modify it.My problem code will begin the %========my problem of code begin here===========

```
%OP4
%declare
K=4;
N=4;
L=5;%distance between RX & TX
nois_var_hk_2pow=0.1*(L^(-2.5))
nois_var_ak_2pow=[10^-7 10^-7 10^-7 10^-7 ];
nois_var_dk_2pow=[10^-5 10^-5 10^-5 10^-5 ];
bar_r=[10 10 10 10];
P_T=10000;
h_1=sqrt(nois_var_hk_2pow/2)*(randn(N,1)+1i*randn(N,1));
h_2=sqrt(nois_var_hk_2pow/2)*(randn(N,1)+1i*randn(N,1));
h_3=sqrt(nois_var_hk_2pow/2)*(randn(N,1)+1i*randn(N,1));
h_4=sqrt(nois_var_hk_2pow/2)*(randn(N,1)+1i*randn(N,1));
h_kk=cat(2,h_1 ,h_2 ,h_3, h_4)
for n=1:4
h_k{n}=h_kk(1:4 , n);
n=n+1;
end
cvx_begin
variable FNNK(N,N,K) semidefinite;%c7
variable rho_k(1,1,K) semidefinite;
variable P
Fkk=cat(2,FNNK);
u=0
for o=1:4
Fk{o}=Fkk(1:4,o+3*u:4*o)
u=u+1;
end
%===============my problem of code begin here================
c5_left_hand = 0;
for k = 1:K
sumja = 0;
for j = 1:K
if j ~= k
sumja = sumja + h_k{k}' * Fk{j} * h_k{k};
end
end
c5_left_hand = c5_left_hand - sumja+ (h_k{k}' * Fk{k} * h_k{k}*inv_pos(bar_r(1)))
end
c5_right_hand= nois_var_ak_2pow(1)+ ( nois_var_dk_2pow(1)*inv_pos(rho_k(k)) )
c5_left_hand >= c5_right_hand
```

And the window told me

```
Error using cvxprob/newcnstr (line 192)
Disciplined convex programming error:
Invalid constraint: {complex affine} >= {convex}
Error in >= (line 21)
b = newcnstr( evalin( 'caller', 'cvx_problem', '[]' ), x, y, '>=' );
Error in op4 (line 74)
c5_left_hand >= c5_right_hand
```

How do i rewrite the code of formula ?if i modify to real(c5_left_hand) >= real( c5_right_hand),the error will become

```
Error using .* (line 262)
Disciplined convex programming error:
Invalid quadratic form(s): not a square.
Error in * (line 36)
z = feval( oper, x, y );
Error in op4 (line 89)
c10_left_hand = c10_left_hand + rho_k(k)*sumja10+nois_var_ak_2pow(1);
```