~ubuntu-branches/ubuntu/hoary/scilab/hoary

« back to all changes in this revision

Viewing changes to demos/lmitool/test.sci

  • Committer: Bazaar Package Importer
  • Author(s): Torsten Werner
  • Date: 2005-01-09 22:58:21 UTC
  • mfrom: (1.1.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20050109225821-473xr8vhgugxxx5j
Tags: 3.0-12
changed configure.in to build scilab's own malloc.o, closes: #255869

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
 function [X]=test(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,test_eval,options)
17
 
 [X]=XLIST(:)
18
 
  
19
 
  
20
 
  
21
 
 /////////////////EVALUATION FUNCTION////////////////////////////
22
 
  
23
 
 function [LME,LMI,OBJ]=test_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)