File: ode_discrete.man

package info (click to toggle)
scilab 2.4-1
  • links: PTS
  • area: non-free
  • in suites: potato, slink
  • size: 55,196 kB
  • ctags: 38,019
  • sloc: ansic: 231,970; fortran: 148,976; tcl: 7,099; makefile: 4,585; sh: 2,978; csh: 154; cpp: 101; asm: 39; sed: 5
file content (42 lines) | stat: -rw-r--r-- 1,086 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
.TH ode_discrete G "February 1998" "Scilab Group" "Scilab Function"
.so ../sci.an 
.SH NAME
ode_discrete - ordinary differential equation solver, discrete time simulation
.SH CALLING SEQUENCE
.nf
[y]=ode('discrete',y0,k0,kvect,f)
.fi
.SH PARAMETERS
.TP 10
y0 
: real vector or matrix (initial conditions).
.TP
t0,
: real scalar (initial time).
.TP
f
: external i.e. function or character string or list.
k0
: integer (initial time).
kvect
: integer vector.
.SH DESCRIPTION
With this syntax (first argument equal to \fV'discrete'\fR)
\fVode\fR computes recursively  \fVy(k+1)=f(k,y(k)\fR)  
from an initial state
\fVy(k0)\fR and returns  \fVy(k)\fR for \fVk\fR in \fVkvect\fR.
\fVkvect(1)\fR must be greater or equal to \fVk0\fR.

Other arguments and other options are the same as for \fVode\fR, see the
ode help.
.SH EXAMPLE
.nf
y1=[1;2;3];deff('yp=a_function(k,y)','yp=A*y+B*u(k)')
A=diag([0.2,0.5,0.9]);B=[1;1;1];u=1:10;n=5;
y=ode('discrete',y1,1,1:n,a_function);
y(:,2)-(A*y1+B*u(1))
// Now y evaluates  at [y3,y5,y7,y9]
y=ode('discrete',y1,1,3:2:9,a_function);
.fi
.SH SEE ALSO
ode