File: artest.sci

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 (41 lines) | stat: -rw-r--r-- 1,052 bytes parent folder | download | duplicates (2)
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
function []=artest(f_l,odem,xdim,npts)
//[]=artest(f_l,[odem,xdim,npts])
// Integration of the lorentz system 
//!
// Copyright INRIA
[lhs,rhs]=argn(0);
if rhs <=3, npts=[100,1],end;
if rhs <=2  then xdim=100*[-1,1,-1,1,-1,1];end;
if rhs <=1, odem='default';end;
if rhs <=0, f_l='arnol';end
x_message(["Integration of the arnold equation";
          "[20;2;2], is a good initial point"]);
portr3d(f_l,odem,xdim,npts);


function [xdot]=arnold(t,x)
//[xdot]=arnold(t,x)
// an example of dynamical system with chaotic behaviour
// due to arnold.
//!
xdot(1)= cos(x(2)) + sin(x(3))
xdot(2)= cos(x(3)) + sin(x(1))
xdot(3)= cos(x(1)) + sin(x(2))


function []=iarf(aa)
//[]=iarf([aa])
// Initialisation des parametres aa(6) pour l'equation d'arnold
//      ydot(1)=aa(1)*cos(y(2)) +aa(2)*sin(y(3))
//      ydot(2)=aa(3)*cos(y(3)) +aa(4)*sin(y(1))
//      ydot(3)=aa(5)*cos(y(1)) +aa(6)*sin(y(2))
// si aucun des arguments n'est fourni on utilise des valeurs
// par defaut
//!
[lhs,rhs]=argn(0)
if rhs==0, aa=ones(1,6);end
fort('arset',aa,1,'r','sort');