 function [X]=test(A1,A2,Q1,Q2)
 // Generated by lmitool on Thu Feb 09 17:48:51 MET 1995
   
   Mbound = 1e3;
   abstol = 1e-10;
   nu = 10;
   maxiters = 100;
   reltol = 1e-10;
   options=[Mbound,abstol,nu,maxiters,reltol];
    
 ///////////DEFINE INITIAL GUESS AND PRELIMINARY CALCULATIONS BELOW
 X_init=zeros(A1)
 /////////// 
  
 XLIST0=list(X_init)
 XLIST=lmisolver(XLIST0,test_eval,options)
 [X]=XLIST(:)
  
  
  
 /////////////////EVALUATION FUNCTION////////////////////////////
  
 function [LME,LMI,OBJ]=test_eval(XLIST)
 [X]=XLIST(:)
  
 /////////////////DEFINE LME, LMI and OBJ BELOW
 LME=X-diag(diag(X))
 LMI=list(-(A1'*X+X*A1+Q1),-(A2'*X+X*A2+Q2))
 OBJ=-trace(X)
