File: gschur.cat

package info (click to toggle)
scilab 2.6-4
  • links: PTS
  • area: non-free
  • in suites: woody
  • size: 54,632 kB
  • ctags: 40,267
  • sloc: ansic: 267,851; fortran: 166,549; sh: 10,005; makefile: 4,119; tcl: 1,070; cpp: 233; csh: 143; asm: 135; perl: 130; java: 39
file content (77 lines) | stat: -rw-r--r-- 2,551 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
gschur            Scilab Group            Scilab Function            gschur
NAME
   gschur - generalized Schur form (matrix pencils).
  
CALLING SEQUENCE
 [As,Es]=gschur(A,E)
 [As,Es,Q,Z]=gschur(A,E)
 [As,Es,Z,dim] = gschur(A,E,flag) 
 [As,Es,Z,dim]= gschur(A,E,extern)
PARAMETERS
 A, E       : two real square matrices
            
 flag       : character string ('c' or 'd')
            
 extern     : Scilab ``external'' function (usual case). Could be also a
            list or a character string
            
 As,Es      : two real square matrices
            
 Q, Z       : two non-singular real matrices
            
 dim        : integer (dimension of subspace)
            
DESCRIPTION
   Schur form of matrix pencils (QZ algorithm):
  
 [As,Es] = gschur(A,E)
   produces a quasi triangular As matrix and a triangular Es matrix which
  are the generalized Schur form of the pair A, E.
  
 [As,Es,Q,Z] = gschur(A,E)
   returns in addition two unitary matrices Q and Z such that As=Q*A*Z and
  Es=Q*E*Z. 
  
   Ordered stable form:
  
 [As,Es,Z,dim] = gschur(A,E,'c')
   returns the real generalized Schur form of the pencil s*E-A. In addition,
  the dim first columns  of Z span a basis of the right eigenspace 
  associated with  eigenvalues with negative real parts (stable "continuous
  time" generalized eigenspace).
  
 [As,Es,Z,dim] = gschur(A,E,'d')
   returns the real generalized Schur form of the pencil s*E-A. In addition,
  the dim first columns  of Z make a basis of the right eigenspace 
  associated with  eigenvalues with magnitude lower than 1 (stable
  "discrete time" generalized eigenspace).
  
   General subspace:
  
 [As,Es,Z,dim] = gschur(A,E,extern)
   returns the real generalized Schur form of the pencil s*E-A.  In
  addition, the dim first columns  of Z make a basis of the right
  eigenspace  associated with  eigenvalues of the pencil which are selected
  according to a rule which is given by the scilab function extern. (See
  schur for definition of this function).
  
EXAMPLE
 s=%s;
 F=[-1,s,0,0;0,-1,0,0;0,0,2+s,0;0,0,0,-2+s];
 roots(det(F))
 [E,A]=pen2ea(F);
 [As,Es,Z,dim] = gschur(A,E,'c')
 // Other example
 a=rand(4,4);b=rand(4,4);[as,bs,qs,zs]=gschur(a,b);
 norm(qs*a*zs-as)
 norm(qs*b*zs-bs )
 clear a;
 a(8,8)=2;a(1,8)=1;a(2,[2,3,4,5])=[0.3,0.2,4,6];a(3,[2,3])=[-0.2,.3];
 a(3,7)=.5;
 a(4,4)=.5;a(4,6)=2;a(5,5)=1;a(6,6)=4;a(6,7)=2.5;a(7,6)=-10;a(7,7)=4;
 b=eye(8,8);b(5,5)=0;
 [al,be]=gspec(a,b);
 [bs,as,q,n]=gschur(b,a,'disc');n-4
SEE ALSO
   external, gspec, pencan, penlaur, coffg, kroneck