Hi,

I wrote the code of an optimization problem but i face an error on matrix dimension.

I checked all elements dimension but i couldn’t find which element has not correct dimension.

can anyone help me to solve the my problem.???

Thank you.

error is on matrix dimension of H_infinite condition

Code :

```
A =[1.1 1;0 1.2];
B = [0;1];
C = [1 0];
Bmu1 = B*0.8;Bmu2 = B*0.9;
delta1 = 0.4;delta2 = 0.5;
mu1 = 0.8;
mu2 = 0.9;
n = size(A,1);
[n1,m] = size(B);
[n2,m1] = size(C);
cvx_begin sdp
variable X(n,n) symmetric;
variable Y(n,n) symmetric;
variable N(n,n) ;
variable Q;
variable AT(n,n);
variable BT(n,m) ;
variable CT(n2,n);
variable DT(n2,m);
variable gama1;
variable gama2;
variable gama3;
variable gama4;
omega1 = A+Bmu1*DT*C;
omega2 = A*X+Bmu1*CT;
omega3 = Y*A+BT*C;
% condition LMI % H-infinite
(delta1^2*gama1+(inv(mu1)-1)*gama2)<1
(delta2^2*gama3+(inv(mu2)-1)*gama4)<1
% H2 condition
U=[Bmu1' Bmu1'*Y;zeros(1,n) Bmu2'*N']
S=[Bmu1 (Bmu1'*Y)';zeros(n,1) (Bmu2'*N')']
L =[X eye(n);eye(n) Y]
[Q*eye(n) U;S L]
% H - infinite condition
[-X -eye(n) omega2 omega1 Bmu1 zeros(n,1) zeros(n,1) zeros(n,1);
-eye(n) -Y AT omega3 (Y*Bmu1) (N'*Bmu1) zeros(n,1) zeros(n,1);
omega2' AT' -X -eye(n) zeros(n,1) zeros(n,1) CT' X*C';
omega1' omega3' -eye(n) -Y zeros(n,1) zeros(n,1) (DT*C)' C';
Bmu1' (Y*Bmu1)' zeros(1,n) zeros(1,n) -gama1*eye(1,1) zeros(1,1) eye(1,1) zeros(1,1);
zeros(1,n) (N'*Bmu1)' zeros(1,n) zeros(1,n) zeros(1,1) -gama3*eye(1,1) zeros(1,1) eye(1,1);
zeros(1,n) zeros(1,n) CT (DT*C) eye(1,1) zeros(1,1) -eye(1,1) zeros(1,1);
zeros(1,n) zeros(1,n) (X*C) C zeros(1,1) eye(1,1) zeros(1,1) -eye(1,1)]<0
trace(Q)<diag([gama2 gama4])
cvx_end
```