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

« back to all changes in this revision

Viewing changes to demos/lmitool/normopt2.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,c]=normopt2(sys)
2
 
// Copyright INRIA
3
 
// Generated by lmitool on Wed Feb 08 14:55:43 MET 1995
4
 
   
5
 
   Mbound = 1e3;
6
 
   abstol = 1e-10;
7
 
   nu = 10;
8
 
   maxiters = 100;
9
 
   reltol = 1e-10;
10
 
   options=[Mbound,abstol,nu,maxiters,reltol];
11
 
    
12
 
 ///////////DEFINE INITIAL GUESS BELOW
13
 
 [A,B,C,D]=abcd(sys)
14
 
 X_init=eye(A);Ib=eye(B'*B);Ic=eye(C*C');                          
15
 
 /////////// 
16
 
  
17
 
 XLIST0=list(X_init,c_init)
18
 
 XLIST=lmisolver(XLIST0,normopt2_eval,options)
19
 
 [X,c]=XLIST(:)
20
 
  
21
 
  
22
 
  
23
 
 /////////////////EVALUATION FUNCTION////////////////////////////
24
 
  
25
 
 function [LME,LMI,OBJ]=normopt2_eval(XLIST)
26
 
 [X,c]=XLIST(:)
27
 
  
28
 
 /////////////////DEFINE LME, LMI and OBJ BELOW
29
 
 LME=X'-X                                                          
30
 
 LMI=-[A*X+X*A',B,X*C';B',-gama*Ib,D';C*X,D,-gama*Ic]              
31
 
 //  LMI=-[A*X*E'+E*X*A',B,E*X*C';B',-gama*Ib,D';C*X*E',D,-gama*Ic]
32
 
 OBJ=gama                                                          
33
 
                                                                   
34