Why does the optimal value become NaN sometimes? i had write the code as the paper shown

My code
hat_p_lowr=0.0317;
%OP4
%declare
K=4;%K channel
N=4;%N antenna
L=5;%distance between RX & TX
xi=10^-4%tolerence between
nois_var_hk_2pow=0.1*(L^(-2.5));%W,0.1*(L^(-2.5)),if this unit is dbm
nois_var_ak_2pow=[1.0000e-10 1.0000e-10 1.0000e-10 1.0000e-10 ];
nois_var_dk_2pow=[1.0000e-08 1.0000e-08 1.0000e-08 1.0000e-08 ];
bar_r=[10 10 10 10];
P_T=10;
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_lowr(N,N,K) semidefinite; %c7
variable rho_k_lowr(1,1,K) semidefinite;
%==========================
%combined lots of FNNK
Fkk_lowr=cat(2,FNNK_lowr);
lowr=0
for o_lowr=1:4
Fk_lowr{o_lowr}=Fkk_lowr(1:4,o_lowr+3*lowr:4*o_lowr)
lowr=lowr+1;
end
tr_ace_lowr=0
for t=1:K
tr_ace_lowr=tr_ace_lowr+trace(Fk_lowr{t})
end
%====================================
%object function
minimize( tr_ace_lowr )
%====================================
%Constraint
subject to
%c3
rho_k_lowr<=1;
%===================================================
%c5
c5_left_hand_lowr = 0;
for k = 1:K
sum_5_lowr = 0;
for j = 1:K
if j ~= k
sum_5_lowr = sum_5_lowr + h_k{k}' * Fk_lowr{j} * h_k{k};
end
end
c5_left_hand_lowr = c5_left_hand_lowr - sum_5_lowr+ (h_k{k}' * Fk_lowr{k} * h_k{k}*inv_pos(bar_r(1)))
c5_right_hand_lowr= nois_var_ak_2pow(1)+ ( nois_var_dk_2pow(1)*inv_pos(rho_k_lowr(k)) )
real( c5_left_hand_lowr ) >= c5_right_hand_lowr
end
%===================================================
%c10
c10_left_hand_lowr = 0;
for k = 1:K
sum_10_lowr = 0;
for j = 1:K
sum_10_lowr= sum_10_lowr + h_k{k}' * Fk_lowr{j} * h_k{k};
end
c10_left_hand_lowr = c10_left_hand_lowr + sum_10_lowr+nois_var_ak_2pow(1)
c10_right_hand_lowr=hat_p_lowr*inv_pos(1-rho_k_lowr(k))
real(c10_left_hand_lowr)>= c10_right_hand_lowr
end
cvx_end