CVX status is unbounded

i tried to solve lmi problem with cvx. i actully used feasible problem that have been solved with yalmip. So this is a feasible problem. but cvx gives 2 error, randomly.

solution status is unbounded and it is not feasible;

alling SDPT3 4.0: 98 variables, 6 equality constraints
For improved efficiency, SDPT3 is solving the dual problem.


Status: Error
Optimal value (cvx_optval): NaN

Array indices must be positive integers or logical values.

Error in cvx_sdpt3>solve (line 211)
Avec{end}{end+1} = reshape( ( str_3 * str_2 ) * reshape( At(ti,:), nt, nv * m ), nt2 * nv, m );

Error in cvx_solve (line 399)
[ x, status, tprec, iters, y ] = shim.solve( At, b, c, cones, params );

Error in cvx_finish (line 57)
[ status, result, bound, iters, tol ] = cvx_solve;

Error in cvx_end (line 11)
evalin( ‘caller’, ‘cvx_finish’ );

Error in untitled2 (line 57)
cvx_end;

This is my code:

clear; clc; cvx_clear;
%%
A{1,1} = [0.93, 0.51; 0.38, 0.83];
B{1,1} = [-1.45; -0.70];
C{1,1} = [1, 0];
% 2nd Vertex
A{2,1} = [0.06, 0.26; 1.80, 0.87];
B{2,1} = [-1.45; -0.70];
C{2,1} = [1, 0];
% Nominal System
A{3,1} = [0.50, 0.39; 1.10, 0.85];
B{3,1} = [-1.45; -0.70];
C{3,1} = [1, 0];
% Sampling Time
ts = 1;
%%
nv = length(A);
nx = size(A{1},2);
nu = size(B{1},2);
ZERO= 1e-6;
ZEROx= zeros(nx,nx);
ZEROux= zeros(nu,nx);
ZEROxu= zeros(nx,nu);
Ix= eye(nx);
Iu= eye(nu);
Wx = eye(size(A{1}));
Wu = eye(size(B{1},2));
y_max= 2;
u_max= 2;
x= [3; 0];

%%
cvx_begin sdp
variable Q(2,2) symmetric
variable gama
variable Y(1,2)
minimize (gama);
subject to
eq{1}=[ [ 1, x’;…
x, Q; ] >=0];
for v=1:length(A)
eq{v+1}=[ [ Q, transpose(A{v}*Q+B{v}*Y), transpose(sqrt(Wx)*Q), transpose(sqrt(Wu)*Y);…
A{v}*Q+B{v}*Y, Q, ZEROx, ZEROxu;…
sqrt(Wx)Q, ZEROx, gamaIx, ZEROxu;…
sqrt(Wu)Y, ZEROux, ZEROux, gamaIu; ]>=0];
end

for v=1:length(A)
    eq{v+length(A)+1}=[[ (u_max^2)*eye(size(B{1},2)),       Y;...
                         transpose(Y),                      Q;      ] >=0];
end

for v=1:length(A)
    eq{v+2*length(A)+1}=[ [     Q,                        transpose(C{v}*(A{v}*Q+B{v}*Y));...
                                C{v}*(A{v}*Q+B{v}*Y),     (y_max^2)*eye(size(C{1},1));            ] >=0];
end

cvx_end;

some one please help me to solve this problem.

I solved it with CVX 2.2 Build 1148 + Mosek 9.2 and SDPT3. In both cases, cvx_optval = +43.3759. (Hiopefully I got it right, because there is a w lot of screwed up formatting and wrong/missing characters I had to fix up in the code - apparently due to display issues.)

I don’t know why you got the errors you did.Are you using CVX 3,0beta? if so, please switch to CVX 2.2.

I am unaware of such a message

solution status is unbounded and it is not feasible;

I don’t know what that means. How is something infeasible and unbounded at the same time? Is this really the message you got? Or did you combine messages from different runs?

thanks for your help,
i’m sorry if you confused from my code. but it was happened because of site’s bugs.
i actually used another solver, but after using Mosek as a solver, i did not get any error and it was solved, well.
i used CVX v2.2.

but for the first error, i put summarized error massage that i have got from a same run.
statues: unbounded
opt_value= +inf
and it says this problem is infeasible after checking 11 iteration.

I think you may be confusing solver message and CVX message. Perhaps CVX solved the dual, the solver said (the dual) is infeasible, and therefore CVX concluded the problem is (primal) unbounded…