File: lin.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 (42 lines) | stat: -rw-r--r-- 1,075 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
lin              Scilab Group              Scilab Function              lin
NAME
   lin - linearization
  
CALLING SEQUENCE
 [A,B,C,D]=lin(sim,x0,u0)
 [sl]=lin(sim,x0,u0)
PARAMETERS
 sim        : function
            
 x0, u0     : vectors of compatible dimensions
            
 A,B,C,D    : real matrices
            
 sl         : syslin list
            
DESCRIPTION
   linearization of the non-linear system [y,xdot]=sim(x,u) around x0,u0.
  
   sim is a function which computes y and xdot.
  
   The output is a linear system (syslin list) sl or the  four matrices
  (A,B,C,D)  For example, if ftz is the function passed to ode e.g.
  
 [zd]=ftz(t,z,u)
   and if we assume that y=x
  
   [z]=ode(x0,t0,tf,list(ftz,u) compute x(tf).
  
   If simula is the following function:
  
 deff('[y,xd]=simula(x,u)','xd=ftz(tf,x,u); y=x;');
   the tangent linear system sl can be obtained by:
  
 [A,B,C,D]=lin(simula,z,u)
 sl = syslin('c',A,B,C,D,x0)
EXAMPLE
 deff('[y,xdot]=sim(x,u)','xdot=[u*sin(x);-u*x^2];y=xdot(1)+xdot(2)')
 sl=lin(sim,1,2);
SEE ALSO
   external, derivat