# My code runnning result always can not be solved

``````function [p_res,eta_res]=sub_p_delay(D_M_B,T_M,E,W,hk,T_l)
p_l=[500,500,500,500];%单位mw
pl_WH=zeros(4,4);

for j=1:5
cvx_begin quiet
variables p(4) eta
minimize eta
expression pWH(4,4)
expression p_pl_WH(4,4)
for k=1:4
for i=1:4
pl_WH(k,i)=p_l(i)*norm(W(:,k)'*hk(i,:)')^2;
pWH(k,i)=p(i)*norm(W(:,k)'*hk(i,:)')^2;
p_pl_WH(k,i)=(p(i)-p_l(i))*norm(W(:,k)'*hk(i,:)')^2;
end
end
subject to
for k=1:4
pll=sum(pl_WH(k,[1:(k-1) (k+1):4]));
pl_SCA=log2((pll)+norm(W(:,k))^2);
D_M_B(k)*inv_pos(eta-T_M(k)) <=...
-rel_entr(1,sum(pWH(k,:))+norm(W(:,k))^2)-pl_SCA-sum(p_pl_WH(k,[1:(k-1) (k+1):4]))/log(2)/(pll+norm(W(:,k))^2);

0.001*p(k)*D_M_B(k)/E(k) <= ...
-rel_entr(1,sum(pWH(k,:))+norm(W(:,k))^2)-pl_SCA-sum(p_pl_WH(k,[1:(k-1) (k+1):4]))/log(2)/(pll+norm(W(:,k))^2);

pWH(k,k)/(pll+norm(W(:,k))^2) <=2^(D_M_B(k)/(T_l(k)-T_M(k)))-1;
0 <= p(k);
p(k) <= 1.5;
end
eta<1;
cvx_end
p_l=p;
end
p_res=p;
eta_res=eta;
end
``````

Calling SeDuMi 1.3.4: 185 variables, 65 equality constraints
For improved efficiency, SeDuMi is solving the dual problem.
SeDuMi 1.3.4 by AdvOL, 2005-2008 and Jos F. Sturm, 1998-2003.
Alg = 2: xz-corrector, Adaptive Step-Differentiation, theta = 0.250, beta = 0.500
eqs m = 65, order n = 134, dim = 186, blocks = 53
nnz(A) = 317 + 0, nnz(ADA) = 605, nnz(L) = 389
it : by gap delta rate t/tP t/tD* feas cg cg prec
0 : 1.75E+02 0.000
1 : -8.30E-01 5.54E+01 0.000 0.3175 0.9000 0.9000 3.55 1 1 5.0E+01
2 : -9.48E-01 2.24E+01 0.000 0.4047 0.9000 0.9000 0.63 1 1 3.5E+01
3 : -1.07E+00 4.83E+00 0.000 0.2155 0.9000 0.9000 -0.20 1 1 2.4E+01
4 : -1.06E+00 2.07E+00 0.000 0.4276 0.9000 0.9000 -0.58 1 1 2.1E+01
5 : -1.02E+00 8.08E-01 0.000 0.3909 0.9000 0.9000 -0.64 1 1 1.9E+01
6 : -1.03E+00 2.48E-02 0.000 0.0307 0.9900 0.9900 -0.87 1 1 1.7E+01
7 : -1.14E+00 2.00E-04 0.000 0.0080 0.9990 0.9990 -1.04 1 1 2.7E+01
8 : -1.07E+00 1.15E-10 0.000 0.0000 1.0000 1.0000 -1.00 1 1 2.1E+01
Dual infeasible, primal improving direction found.
iter seconds |Ax| [Ay]_+ |x| |y|
8 0.0 7.7e-11 1.5e-11 1.3e+01 1.8e-08
Detailed timing (sec)
Pre IPM Post
9.998E-03 2.000E-02 0.000E+00
Max-norms: ||b||=1, ||c|| = 6.000000e+00,
Cholesky |add|=0, |skip| = 0, ||L.L|| = 61.9448.
Status: Infeasible
Optimal value (cvx_optval): +Inf
Sometimes result is infeasible and sometimes result is failed .I tried to change the value of other variables ,but the results still were not solved .

Try to show some log outputs or reproducible code with data. Do not use `quiet`. Numerical issues are very likely.