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): NaNArray 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.