# problème whith lmi optimisation

good evening all, I have a problem of execution of a program, after instalation the cvx in matlab, I have a main program that calls a function program (a function of residue generation in two Constrain LMI, my goal is to calculate the optimal values (K,V) for both LMI ,I want the values k and v programe but Icould not exucute , help me if you can
this is main program

``````% Diagnostic à base observateur

% Modélisation en vue du diagnostic

% Construction des matrices
% Construction des matrices
A =[-2.121 -0.5624 -0.2651 -0.25;4 0 0 0;0 1 0 0;0 0 0.25 0];
B =[1;1;1;1];
C=[-1.141 -0.4374 -0.1768 0;0 0 0 1;0 0 0 0;0 0 0 0];
Dx=[0.02 -0.02 0 0;0.02 0.1 0 0;0.02 -0.02 0 0; 0.02 0.1 0 0];
Fx=[1 0 0 0;0 1 0 0;0 1 0 0;0 1 0 0];
Fy=[2 0 0 0;0 2 0 0;0 0 0 0;0 0 0 0];
Dy=[0 1 0 0;0 0 1 0;0 0 0 0;0 0 0 0];
% Synthèse d'un OEI avec découplache approché optimal
%Résolution du prblème de synthèse mixte  hinfini\H_
b=0.1;
[K,V,gam_opt,beta_opt]=GenResHinfHmin(A,C,Fx,Dx,Fy,Dy,b)
``````

and
this is function program

``````function[K,V,gam_opt,beta_opt]=GenResHinfHmin(A,C,Fx,Dx,Fy,Dy,b)
%  dim1 =size(Dx);
%  n=dim1(1);
%  nd=dim1(2);
%  dim =size(Fy);
%  p=dim(1);
%  nf=dim(2);
nd=4;
p=2;
nf=4;
cvx_begin sdp quiet
%  variable P(n,n)symmetric;
%  variable Q(p,p)symmetric;
%  variable L(n,p) ;
%   variable K(4,2) ;
%   variable V(2,2) ;

variable P(4,4) symmetric;
variable Q(4,4) symmetric;
variable L(4,4);
variable g;
minimize g;
subject  to
P>=0;
[A'*P+P*A-L*C-C'*L'+C'*Q*C P*Dx-L*Dy+C'*Q*Dy;(P*Dx-L*Dy+C'*Q*Dy)' Dy'*Q*Dy-g*eye(nd)]<=0;

[C'*Q*C-A'*P-P*A+C'*L'+L*C,C*Q*Fy-P*Fx+L'*Fy;(C'*Q*Fy-P*Fx+L*Fy)',Fy'*Q*Fy-b*eye(nf)]>=0;
cvx_end
if cvx_optval<Inf
gam_opt=sqrt(g);
beta_opt=sqrt(b);
K=P\L;
V=Q^(1/2);
gam_opt/beta_opt
end
``````

there is a person who can help me please

good evening all, I have a problem of execution of a program, after instalation the cvx in matlab, I have a main program that calls a function program (a function of residue generation in two Constrain LMI, my goal is to calculate the optimal values (K,V) for both LMI ,I want the values k and v programe but Icould not exucute , help me if you can
main program:
A =[-2.121 -0.5624 -0.2651 -0.25;4 0 0 0;0 1 0 0;0 0 0.25 0];
B =[1;1;1;1];
C=[-1.141 -0.4374 -0.1768 0;0 0 0 1;0 0 0 0;0 0 0 0];
Dx=[0.02 -0.02 0 0;0.02 0.1 0 0;0.02 -0.02 0 0; 0.02 0.1 0 0];
Fx=[1 0 0 0;0 1 0 0;0 1 0 0;0 1 0 0];
Fy=[2 0 0 0;0 2 0 0;0 0 0 0;0 0 0 0];
Dy=[0 1 0 0;0 0 1 0;0 0 0 0;0 0 0 0];
b=0.1;
[K,V,gam_opt,beta_opt]=GenResHinfHmin(A,C,Fx,Dx,Fy,Dy,b)
function program:
function[K,V,gam_opt,beta_opt]=GenResHinfHmin(A,C,Fx,Dx,Fy,Dy,b)
% dim1 =size(Dx);%n=dim1(1);%nd=dim1(2);%dim =size(Fy);%p=dim(1);%nf=dim(2);
nd=4;
p=2;
nf=4;
cvx_begin sdp quiet
%variable P(n,n)symmetric;%variable Q(p,p)symmetric;%variable L(n,p);
%variable K(4,2);%variable V(2,2) ;
variable P(4,4) symmetric;
variable Q(4,4) symmetric;
variable L(4,4);
variable g;
minimize g;
subject to
P>=0;
[A’P+PA-LC-C’L’+C’QC PDx-LDy+C’QDy;(PDx-LDy+C’QDy)’ Dy’QDy-geye(nd)]<=0;
[C’QC-A’P-PA+C’L’+LC,C
QFy-PFx+L’Fy;(C’QFy-PFx+LFy)’,Fy’QFy-beye(nf)]>=0;
cvx_end
if cvx_optval<Inf
gam_opt=sqrt(g);
beta_opt=sqrt(b);
K=P\L;
V=Q^(1/2);
gam_opt/beta_opt
end