# Dual problem is suspected of being infeasible

Code:
indent preformatted text by 4 spaces
m=4;
f=1;
k=2;
z1 = zeros(m,k);
data = [0 0;1 1;2 2;4 0];

x = sdpvar(k,f+1);
y = sdpvar(m,k+1);

%Constraints
C=[];
for j=[1,2]
for i=[1,2,3,4]
C = [C,y(i,1+j)^2-z1(i,j)<=0];
end
end

``````for j=[1,2]
for i=[1,2,3,4]
C=[C,power((x(j,1:f)*data(i,1:f)-x(j,f+1)-data(i,f+1)),2)-z1(i,j)<=0];
end
end

for i=[1,2,3,4]
C=[C,(-1)*y(i,1)<=0];
end

for j=[1,2]
for i=[1,2,3,4]
C=[C,y(i,1)-y(i,1+j)<=0];
end
end
``````

options = sdpsettings(‘solver’, ‘sedumi’, ‘sedumi.eps’, 1e-8, …
‘sedumi.cg.qprec’, 1, ‘sedumi.cg.maxiter’, 49, …
‘sedumi.stepdif’, 2);

%Objective function
z = sum(y(:,1))+sum(sum(power(y(:,2:k+1),2))) - 2*sum(sum(z1)) +sum(sum(power((x(:,1:f)*data(:,1:f)’+repmat(x(:,f+1),1,m)-repmat(data(:,f+1)’,k,1)),2)));

sol = optimize(C, z, options);
reuslt = optimize(C,z);

Output:

num. of constraints = 16
dim. of socp var = 49, num. of socp blk = 17
dim. of linear var = 12

SDPT3: Infeasible path-following algorithms

## 0|0.000|0.000|1.0e+01|4.9e+00|7.9e+03|-7.529223e+01 0.000000e+00| 0:0:00| chol 1 1 1|0.576|0.577|4.2e+00|2.1e+00|4.1e+03| 7.080555e+00 -7.137655e+01| 0:0:00| chol 1 1 2|0.552|0.536|1.9e+00|9.7e-01|2.2e+03|-3.580429e+01 -1.229439e+01| 0:0:00| chol 1 1 3|0.897|0.474|1.9e-01|5.1e-01|1.4e+03|-9.619168e+01 -1.714802e+01| 0:0:00| chol 1 1 4|0.433|0.173|1.1e-01|4.2e-01|1.4e+03|-6.715426e+02 -2.978099e+01| 0:0:00| chol 1 1 5|0.638|0.101|4.0e-02|3.8e-01|2.6e+03|-1.826244e+04 -2.565729e+01| 0:0:00| chol 1 1 6|0.323|0.051|2.7e-02|3.6e-01|1.5e+04|-1.754082e+06 -3.101196e+01| 0:0:00| chol 1 1 7|0.003|0.007|2.7e-02|3.6e-01|8.4e+04|-8.032221e+07 -3.238498e+01| 0:0:00| chol 2 1 8|0.000|0.001|2.7e-02|3.6e-01|2.0e+05|-7.734770e+08 -3.255868e+01| 0:0:00| chol 2 2 9|0.000|0.000|2.7e-02|3.6e-01|8.7e+05|-6.990075e+09 -3.260913e+01| 0:0:00| chol 2 2 10|0.000|0.000|2.7e-02|3.6e-01|5.9e+06|-6.290008e+10 -3.264703e+01| 0:0:00| chol 2 2 11|0.000|0.000|2.7e-02|3.6e-01|4.9e+07|-5.658402e+11 -3.271089e+01| 0:0:00| chol 2 2 12|0.000|0.000|2.7e-02|3.6e-01|4.3e+08|-5.093992e+12 -3.286121e+01| 0:0:00| chol * 2 2 13|0.000|0.000|2.7e-02|3.6e-01|4.0e+09|-4.850520e+13 -3.324333e+01| 0:0:00| chol * 3 3 stop: primal infeas has deteriorated too much, 2.6e+01 14|0.000|0.000|2.7e-02|3.6e-01|4.0e+09|-4.850520e+13 -3.324333e+01| 0:0:00| prim_inf,dual_inf,relgap = 2.72e-02, 3.59e-01, 8.31e-05 sqlp stop: dual problem is suspected of being infeasible

number of iterations = 14
residual of dual infeasibility
certificate X = 4.08e-13
reldist to infeas. <= 3.21e-14
Total CPU time (secs) = 0.10
CPU time per iteration = 0.01
termination code = 2
DIMACS: 3.3e-02 0.0e+00 4.8e-01 0.0e+00 -1.0e+00 8.3e-05

MOSEK and SeDuMi are more reliable when it comes to detect infeasibility. So I suggest you try one of those for starter.

If it is truly you have to figure out why.