~ubuntu-branches/ubuntu/karmic/scilab/karmic

« back to all changes in this revision

Viewing changes to demos/lmitool/tset.sci

  • Committer: Bazaar Package Importer
  • Author(s): Torsten Werner
  • Date: 2002-03-21 16:57:43 UTC
  • Revision ID: james.westby@ubuntu.com-20020321165743-e9mv12c1tb1plztg
Tags: upstream-2.6
ImportĀ upstreamĀ versionĀ 2.6

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
 function [X]=tset(A1,A2,Q1,Q2)
 
2
 // Generated by lmitool on Thu Feb 09 17:48:51 MET 1995
 
3
   
 
4
   Mbound = 1e3;
 
5
   abstol = 1e-10;
 
6
   nu = 10;
 
7
   maxiters = 100;
 
8
   reltol = 1e-10;
 
9
   options=[Mbound,abstol,nu,maxiters,reltol];
 
10
    
 
11
 ///////////DEFINE INITIAL GUESS AND PRELIMINARY CALCULATIONS BELOW
 
12
 X_init=zeros(A1)
 
13
 /////////// 
 
14
  
 
15
 XLIST0=list(X_init)
 
16
 XLIST=lmisolver(XLIST0,tset_eval,options)
 
17
 [X]=XLIST(:)
 
18
  
 
19
  
 
20
  
 
21
 /////////////////EVALUATION FUNCTION////////////////////////////
 
22
  
 
23
 function [LME,LMI,OBJ]=tset_eval(XLIST)
 
24
 [X]=XLIST(:)
 
25
  
 
26
 /////////////////DEFINE LME, LMI and OBJ BELOW
 
27
 LME=X-diag(diag(X))
 
28
 LMI=list(-(A1'*X+X*A1+Q1),-(A2'*X+X*A2+Q2))
 
29
 OBJ=-trace(X)