Reconnaissance du chaos  

Reconnaissance du chaos Commit Details

Date:2014-03-24 14:07:07 (3 years 8 months ago)
Author:Ahmed Abdul Rahuman
Branch:master
Commit:c87b68a367b386343fa6304a25c21bfa7dbabc4d
Parents: 5eac7b5d4ed6666b4c2629c7186e6599d25972b5
Message:Signed-off-by: aamadou <a.amadou.yahoo@gmail.com>

Changes:
DChaos01.exe
DExemples/Exemple_4_1.sce (full)
DExemples/Exemple_4_2.sce (full)
DInstallation.html (full)
DLICENSE (full)
DREADME.md (full)
Dsci/Bifur.sci (full)
Dsci/Chaos01.sci (full)
Dsci/Delay_var.sci (full)
Dsci/FDouble.sci (full)
Dsci/Henon_orbit.sci (full)
Dsci/Lyap_K.sci (full)
Dsci/Lyap_R.sci (full)
Dsci/RateOfConvergence.sci (full)
Dsci/ReadMITData.sci (full)
Dsci/d2.sci (full)
Dsci/dvv.sci (full)
Dsci/false_nearest.sci (full)
Dsci/lyap_spec.sci (full)
Dsci/makenoise.sci (full)
Dsci/mutual.sci (full)
Dsci/nstat_z.sci (full)
Dsci/orb.sci (full)
Dsci/poincare.sci (full)
Dsci/stp.sci (full)
Dsci/surrogates.sci (full)

File differences

Exemples/Exemple_4_1.sce
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
deff('[Xn]=f(Xn_1,c)','Xn=c*Xn_1*(1-Xn_1)');
x0=0.0001;
c=[3.5:.001:4] ;
orbits=[];
for i=c,
orbit=orb(20000,i,x0,f);
orbits=[orbits;orbit(1,$-999:$)];
end
Lest=[];
err=[];
save('Test_Logidt_K_orbits_c.dat',orbits,c);
for i=1:size(orbits,1),
[Nbr,L,Lesti,erri]=Lyap_K(orbits(i,:),,,,,1000,30, %T, 4);
Lesti=mean(Lesti);
erri=mean(erri);
if modulo(i,100)==0 then save('Test_Logidt_K_Lest_err.dat',Lest,err), end;
Lest=[Lest, Lesti];
err=[err, erri];
end;
plot2d(c,Lest);
Exemples/Exemple_4_2.sce
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
deff('[Xn]=f(Xn_1,c)','Xn=c*Xn_1*(1-Xn_1)');
x0=0.0001;
c=[3.5:.001:4] ;
orbits=[];
for i=c,
orbit=orb(20000,i,x0,f);
orbits=[orbits;orbit(1,$-999:$)];
end
Kest=[];
C=[];
save('Test_Logidt_Chaos01_orbits_c.dat',orbits,c);
for i=1:size(orbits,1),
[Kesti,Ci]=Chaos01(orbits(i,:)');
C=[C,Ci];
disp(i)
disp(string(round(i/size(orbits,1)*100))+'%')
Kest=[Kest, median(Kesti)];
save('Test_Logidt_Chaos01_Kest_C.dat',Kest,c,C)
end;
plot2d(c,Kest);
Installation.html
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
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="CONTENT-TYPE" CONTENT="text/html; charset=windows-1252">
<TITLE></TITLE>
<META NAME="GENERATOR" CONTENT="OpenOffice.org 3.1 (Win32)">
<META NAME="AUTHOR" CONTENT="Ahmed Abdul Rahman">
<META NAME="CREATED" CONTENT="20091201;8483700">
<META NAME="CHANGEDBY" CONTENT="Ahmed Abdul Rahman">
<META NAME="CHANGED" CONTENT="20091209;13321100">
</HEAD>
<BODY LANG="fr-FR" DIR="LTR">
<OL>
<P><FONT SIZE=4>Installation de la boite &agrave; outils
&laquo;&nbsp;IsItChaos&nbsp;&raquo;</FONT></P>
</OL>
<P>Certaines fonctions sont utilisables directement sous Scilab ou
ScicosLab, et d'autres n&eacute;cessitent la pr&eacute;-installation
de logiciels additionels. Les &eacute;tapes suivantes sont
n&eacute;cessaires pour la pleine exploitation de la boite &agrave;
outils :</P>
<OL>
<LI><P>T&eacute;l&eacute;charger et installer Scilab &agrave; partir
du site officiel :</P>
<P><A HREF="http://www.scilab.org/download/">http://www.scilab.org/download/</A></P>
<LI><P>T&eacute;l&eacute;charger et installer la biblioth&egrave;que
TiSeAn en suivant le lien :</P>
<P><A HREF="http://www.mpipks-dresden.mpg.de/%7Etisean/Tisean_3.0.1/index.html">http://www.mpipks-dresden.mpg.de/~tisean/Tisean_3.0.1/index.html</A></P>
<P>Ajouter le sous-r&eacute;pertoire &quot;bin&quot; de TiSeAn &agrave;
la variable syst&egrave;me PATH.</P>
<LI><P>T&eacute;l&eacute;charger et installer la boite &agrave;
outils modnum &agrave; partir de :</P>
<P><A HREF="http://www.scicos.org/ScicosModNum/modnum_web/web/eng/eng.htm">http://www.scicos.org/ScicosModNum/modnum_web/web/eng/eng.htm</A></P>
<P><I>Re :</I> L'installation de &laquo;&nbsp;modnum&nbsp;&raquo;
est beaucoup plus facile sous ScicosLab que sous Scilab, vous
trouveriez ScicosLab ici:</P>
<P><A HREF="http://www.scicoslab.org/">http://www.scicoslab.org/</A></P>
<LI><P>T&eacute;l&eacute;charger et installer la biblioth&egrave;que
WFDB de PhisoBank en suivant le lien :</P>
<P><A HREF="http://www.physionet.org/physiotools/wfdb-windows-quick-start.shtml">http://www.physionet.org/physiotools/wfdb-windows-quick-start.shtml</A></P>
<P>&nbsp;Ajouter le sous-r&eacute;pertoire &quot;bin&quot; de wfdb &agrave;
la variable syst&egrave;me PATH.</P>
<LI><P>T&eacute;l&eacute;charger les fonctions compress&eacute;s
&laquo;&nbsp;IsItChaos&nbsp;&raquo; en suivant le lien</P>
<P><A HREF="http://sites.google.com/site/isitchaos/telechargement">http://sites.google.com/site/isitchaos/telechargement</A></P>
</OL>
<OL START=0>
<P>D&eacute;compresser l'archive et &agrave; partir de scilab
executer le script &laquo;&nbsp;builder.sce&nbsp;&raquo; une seul
fois et ensuite &eacute;xecuter le script &laquo;&nbsp;loader.sce&nbsp;&raquo;
&agrave; chaque fois que vous voulez charge la boite &agrave;
outils.</P>
</OL>
<P><BR><BR>
</P>
<P><BR><BR>
</P>
</BODY>
</HTML>
LICENSE
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
The MIT License (MIT)
Copyright (c) 2014 aamadou
Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
the Software without restriction, including without limitation the rights to
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
the Software, and to permit persons to whom the Software is furnished to do so,
subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
README.md
1
2
3
4
IsItChaos
=========
Scientifique Tool for Chaos Recognision
sci/Bifur.sci
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
function [orbits]=Bifur(Map,NbrItiCalc,XO,Aini,Afin,Etap,NbrItiGraph)
orbits=[]
if ~isdef('Map','local')...
then
Map=orb
end;
if ~isdef('Aini','local')...
then Aini=0
end;
if ~isdef('Afin','local')...
then Afin=-2
end;
if ~isdef('Etap','local')...
then Etap=-0.01
end;
if ~isdef('NbrItiGraph','local')...
then NbrItiGraph=100
end;
A=[Aini:Etap:Afin]
for i=A...
if ~isdef('NbrItiCalc','local')...
then if ~isdef('X0','local')...
then orbits=[orbits;Map(,i)],
else orbits=[orbits;Map(,i,X0)],
end,
else if ~isdef('X0','local')...
then orbits=[orbits;Map(NbrItiCalc,i)],
else orbits=[orbits;Map(NbrItiCalc,i,X0)],
end
end
end
clf
plot2d(A,orbits(:,$-NbrItiGraph:$),0*ones(1:size(orbits(:,$-NbrItiGraph:$),2)))
endfunction
sci/Chaos01.sci
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
function [K,C]=Chaos01(orbit)
if ~isdef('N','local')...
then N=2000,
end;
K=[];
C=[];
for i=1:100
CC=[0];
while CC==[0],
CC=rand(1,1)*2*%pi;
end;
C=[C CC];
end;
i=0;
for j=C
mdelete('tmp')
write('tmp',[j;orbit]);
test=host('Chaos01.exe tmp tmp1');
if test~=0...
then
disp('l''utilitaire Chaos01 non trouvz');
break;
else;
x=read('tmp1',1,1);
K=[K,x(1,1)];
i=i+1;
// disp(string(i)+'%');
end;
end;
// plot2d(C,K)
endfunction;
sci/Delay_var.sci
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
function DV=Delay_var(orbit,NbrIti,Dim,Delai)
Commandline='';
if isdef('NbrIti','local')...
then Commandline=Commandline+' -l'+string(NbrIti),
end;
if isdef('Dim','local')...
then Commandline=Commandline+' -m'+string(Dim),
end;
if isdef('Delai','local')...
then Commandline=Commandline+' -d'+string(Delai),
end;
if isdef('orbit','local')...
then
mdelete('tmp')
mdelete('tmp.del')
write('tmp',string(orbit)),
Commandline=' tmp'+Commandline,
end;
Commandline='delay'+Commandline+' -otmp.del',
test=host(Commandline);
if test~=0...
then
else
orbit=read('tmp.del',-1,1,'(a)'),
//orbit=strsubst(orbit,'1.#INF','10e308');
DV=evstr(orbit);
end;
endfunction
sci/FDouble.sci
1
2
3
4
5
6
7
8
9
10
function xn=FDouble(xn_1,c)
z=xn_1
if (z(1,1).num>=0)&(z(1,1).num*2<z(1,1).den)
xn(1,1)=z(1,1)*2
end;
if (z(1,1).num*2>=z(1,1).den)&(z(1,1).num<z(1,1).den)
xn(1,1)=z(1,1)*2-1
end;
endfunction;
sci/Henon_orbit.sci
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
function [x,y]=Henon_orbit(NbrIti,A,X0,B,Y0,NbrItTrans)
if ~isdef('NbrIti','local')...
then NbrIti=1000,
end;
Commandline='henon -l'+string(NbrIti),
if isdef('A','local')...
then Commandline=Commandline+' -A'+string(A),
end;
if isdef('B','local')...
then Commandline=Commandline+' -B'+string(B),
end;
if isdef('X0','local')...
then Commandline=Commandline+' -X'+string(X0),
end;
if isdef('Y0','local')...
then Commandline=Commandline+' -Y'+string(Y0),
end;
if isdef('NbrItTrans','local')...
then Commandline=Commandline+' -x'+string(NbrItTrans),
end;
mdelete('tmp.ahm') ,
Commandline=Commandline+' > temp.ahm';
test=host(Commandline);
if test~=0...
then
else
orbit=read('temp.ahm',-1,1,'(a)'),
orbit=strsubst(orbit,'1.#INF','10e308');
orbit=evstr(orbit),
x=orbit(:),
y=orbit(:,2),
x=x.',
y=y.',
end;
endfunction
sci/Lyap_K.sci
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
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
function [NmrIti,L,Lest,err,Nbrelem,Indexelem]=Lyap_K(orbit,NbrIti,Dim,Delai,MinEps, NbrRef, NbrTimeIti, DoEstim, MaxDim, TheWin)
// Initialisation
Commandline='';
Lest=[];
err=[];
NmrIti=[];
L=[];
if ~isdef('DoEstim','local')...
then DoEstim=%F,
end;
if isdef('NbrIti','local')...
then Commandline=Commandline+' -l'+string(NbrIti),
end;
if isdef('MaxDim','local')...
then Commandline=Commandline+' -M'+string(MaxDim),
else Commandline=Commandline+' -M'+string(Dim),
end;
if isdef('Dim','local')...
then Commandline=Commandline+' -m'+string(Dim),
end;
if isdef('MinEps','local')...
then Commandline=Commandline+' -r'+string(MinEps),
end;
if isdef('NbrRef','local')...
then Commandline=Commandline+' -n'+string(NbrRef),
end;
if isdef('NbrTimeIti','local')...
then Commandline=Commandline+' -s'+string(NbrTimeIti),
else NbrTimeIti=50;
end;
if isdef('TheWin','local')...
then Commandline=Commandline+' -t'+string(TheWin),
end;
if isdef('Delai','local')...
then Commandline=Commandline+' -d'+string(Delai),
end;
// Utilisation de Lyap_K from TiSeAn
if isdef('orbit','local')...
then
mdelete('tmp')
write('tmp',string(orbit)),
Commandline=' tmp'+Commandline+' -otmpout.dat',
end;
mdelete('tmpout.dat')
Commandline='lyap_k'+Commandline,
// Reading the output
x=host(Commandline);
if x~=0...
then
disp('Erreur!!! Fichier ou Tisean manquant');
return;
end;
x=read('tmpout.dat',-1,1,'(a)');
y=[];
for i=1:size(x,1) do
if length(x(i))>3...
then
y=[y,x(i)];
end;
end;
x=y;
carct=[];
for i=1:size(x,1) do
carct=[carct '#'];
end;
ix=grep(x',carct);
indexelem=ix;
x=strsubst(x,'#epsilon= ','');
x=strsubst(x,'dim= ',' 0 ');
x=evstr(x');
NmrIti=x(:,1),
L=x(:,2),
Nbrelem=x(:,3),
// Estimating the slopes
ix=[ix size(x,1)+1];
deff('y=FF(x)','y=a*x+b'),
deff('e=G(p,z)','a=p(1),b=p(2),y=z(1),x=z(2),e=y-FF(x)'),
if DoEstim==%T...
then
for i=1:size(ix,2)-1 do
NmrItii=x(ix(1,i)+1:ix(1,i+1)-1,1),
Li=x(ix(1,i)+1:ix(1,i+1)-1,2),
aest=[],
eest=[],
if (NmrItii~=[])&(size(NmrItii,1)>8)...
then
for j=4:size(Li,1)/2+1 do
xx=NmrItii(1:j)',
yy=Li(1:j)',
Z=[yy;xx]
[p,e]=fit_dat(G,[0;0],Z),
if (e<.01)...
then
aest=[aest,p(1)],
eest=[eest,e],
end
end;
if aest~=[]...
then
z=min(aest),
else
z=-1
end;
if z>0...
then
[err1,k]=min(eest),
err=[err err1];
Lest=[Lest aest(k)],
else
Lest=[Lest 0];
err=[err -1];
end;
else
Lest=[Lest 0];
err=[err -1];
end;
end;
end;
endfunction
sci/Lyap_R.sci
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
78
79
80
81
82
83
84
function [NmrIti,L,Lest,err]=Lyap_R(orbit,NbrIti,Dim,Delai,MinEps, WinOmi, NbrTimeIti,DoEstim);
Commandline='';
Lest=[];
err=[];
if ~isdef('DoEstim','local')...
then DoEstim=%F,
end;
if isdef('NbrIti','local')...
then Commandline=Commandline+' -l'+string(NbrIti),
end;
if isdef('Dim','local')...
then Commandline=Commandline+' -m'+string(Dim),
end;
if isdef('WinOmi','local')...
then Commandline=Commandline+' -t'+string(WinOmi),
end;
if isdef('MinEps','local')...
then Commandline=Commandline+' -r'+string(MinEps),
end;
if isdef('NbrTimeIti','local')...
then Commandline=Commandline+' -s'+string(NbrTimeIti),
end;
if isdef('Delai','local')...
then Commandline=Commandline+' -d'+string(Delai),
end;
if isdef('orbit','local')...
then
mdelete('tmp')
write('tmp',string(orbit.')),
Commandline=' tmp'+Commandline+' -otmpout.dat',
end;
mdelete('tmpout.dat')
Commandline='lyap_r'+Commandline,
x=evstr(unix_g(Commandline));
x=read('tmpout.dat',-1,2);
if (x~=[])&(size(x,1)>8)...
then
NmrIti=x(:,1);
L=x(:,2);
else
NmrIti=[0];
L=[0];
Lest=[0];
err=[-1];
return;
end;
if DoEstim==%T...
then
x=[],
y=[],
aest=[],
eest=[],
for i=1:size(L,1) do
x=NmrIti(1:size(L,1)-i+1)',
y=L(1:size(L,1)-i+1)',
deff('y=FF(x)','y=a*x+b'),
deff('e=G(p,z)','a=p(1),b=p(2),y=z(1),x=z(2),e=y-FF(x)'),
Z=[y;x]
[p,e]=fit_dat(G,[0;0],Z),
aest=[aest,p(1)],
eest=[eest,e],
end;
z=min(aest(size(aest,2)/3+1:size(aest,2))),
if z>0...
then
[err,k]=min(eest(size(eest,2)/3+1:size(eest,2))),
x=aest(size(eest,2)/3+1:size(eest,2));
Lest=x(k),
else
NmrIti=[0];
L=[0];
Lest=[0];
err=[-1];
end;
end;
endfunction;
sci/RateOfConvergence.sci
1
2
3
4
5
6
7
8
function [FixedPoint]=RateOfConvergence(Maps,InitialSeed)
for i=1:sizeof(Maps,1)
orbit=orb(InitialSeed(1,1),Maps(i).c)
end;
endfunction;
sci/ReadMITData.sci
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
function [dat,Anot]=ReadMITdata(FileName,Antr,StopTime);
dat=[];
Anot=[];
if isdef('FileName','local')...
then
mdelete('tmp.ahm') ,
else
disp('Nom de fichier monquant!!!'),
abort,
end;
if ~isdef('Antr','local')...
then
Antr='atr' ,
end;
if isdef('StopTime','local')...
then
StopTime=' -t '+StopTime,
else
StopTime='',
end;
Commandline='rdsamp -r '+FileName+StopTime+' -p > temp.ahm',
test=host(Commandline);
if test~=0...
then
else
dat=fscanfMat('temp.ahm');
end;
mdelete('tmp.ahm') ,
Commandline='rdann -r '+FileName+' -a '+Antr+StopTime+' -x > temp.ahm',
test=host(Commandline);
if test~=0...
then
else
x=read('temp.ahm',-1,1,'(a)'),
BeatsSec = evstr(part(x,1:10)),
BeatsMin = evstr(part(x,11:19)),
BeatsHrs = evstr(part(x,20:30)),
BeatsType = part(x,35),
Anot=tlist(['Annotaion';'BeatsSec';'BeatsMin';'BeatsHrs';'BeatsType'],BeatsSec,BeatsMin,BeatsHrs,BeatsType),
end;
endfunction
sci/d2.sci
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
78
79
80
81
function [x]=d2(orbit,NbrIti,Dim,Delai, NbrEps, TheWin, MaxLenSca, MinLenSca)
// Initialisation
Commandline='';
NbrComp=size(orbit,2);
if ~isdef('DoEstim','local')...
then DoEstim=%F,
end;
if isdef('NbrIti','local')...
then Commandline=Commandline+' -l'+string(NbrIti),
end;
if isdef('Dim','local')...
then Commandline=Commandline+' -M'+string(NbrComp)+','+string(Dim),
end;
if isdef('NbrPair','local')...
then Commandline=Commandline+' -N'+string(NbrPair),
end;
if isdef('NbrEps','local')...
then Commandline=Commandline+' -#'+string(NbrEps),
end;
if isdef('MaxLenSca','local')...
then Commandline=Commandline+' -R'+string(MaxLenSca),
end;
if isdef('MinLenSca','local')...
then Commandline=Commandline+' -r'+string(MinLenSca),
end;
if isdef('TheWin','local')...
then Commandline=Commandline+' -t'+string(TheWin),
end;
if isdef('Delai','local')...
then Commandline=Commandline+' -d'+string(Delai),
end;
// Utilisation de Lyap_K from TiSeAn
if isdef('orbit','local')...
then
mdelete('tmpin') ;
mdelete('tmp.c2') ;
mdelete('tmp.d2') ;
mdelete('tmp.h2') ;
mdelete('tmp.stat') ;
write('tmpin',string(orbit)),
Commandline=' tmpin'+Commandline+' -c'+string(NbrComp)+' -otmp',
end;
Commandline='d2'+Commandline,
// Reading the output
x=host(Commandline);
if x~=0...
then
disp('Erreur!!! Fichier ou Tisean manquant');
return;
end;
x=read('tmp.d2',-1,1,'(a)');
y=[];
for i=1:size(x,1) do
if length(x(i))>3...
then
y=[x(i);y];
end;
end;
x=y;
carct=[];
for i=1:size(x,1) do
carct=[carct '#'];
end;
ix=grep(x',carct);
indexelem=ix;
x=strsubst(x,'#center= ','0 ');
x=strsubst(x,'#dim= ','0 ');
x=evstr(x);
y=[];
col=2;
for i=1:size(x,1);
if x(i,1)~=0 then y=[x(i,1) x(i,2); y], end;
end;
x=y;
endfunction
sci/dvv.sci
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
function [DVV,rd]=dvv(orbit,NbrIter, Dim, Delai, nd, N0);
if isdef('NbrIti','local')...
then NbrIter=size(orbit,2),
end;
if isdef('Dim','local')...
then Dim=2,
end;
if isdef('Delai','local')...
then Delai=1,
end;
if isdef('nd','local')...
then nd=3,
end;
if isdef('N0','local')...
then N0=30,
end;
M=Dim
L=Delai;
x1_x2_x3=Delay_var(orbit,NbrIter+L*M,M,L);
dist=[]
for i=1:NbrIter-1;
dist=[norm(x1_x2_x3(i,:)-x1_x2_x3(i+1,:),2) dist];
end;
mud=mean(dist)
segd=stdevf(dist,ones(dist))
vartot=variance(orbit)
nd=3
rd=[mud-nd*segd:2*nd*segd/30:mud+nd*segd];
DVV=[]
N0=3;
rdi=[];
for rdi=rd
omega=[];
for i=1:NbrIter;
omegai=[];
for j=1:NbrIter-1;
if norm(x1_x2_x3(i,:)-x1_x2_x3(j,:),2)<=rdi then omegai=[omegai ; x1_x2_x3(j+1,:)]; end;
end;
if size(omegai,2) >=N0...
then
v=variance(omegai);
omega=[v omega];
end
end
if omega ==[]...
then DVV=[0 DVV]
else DVV=[mean(omega)./vartot DVV];
end
end
endfunction
sci/false_nearest.sci
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
function [dim,FalseNberFrac,NberSize,NberSize2]=false_nearest(orbit,NbrIti,Dim,Delai, RatRef, MaxDim, TheWin)
// Initialisation
Commandline='';
NbrComp=size(orbit,2);
if ~isdef('DoEstim','local')...
then DoEstim=%F,
end;
if isdef('NbrIti','local')...
then Commandline=Commandline+' -l'+string(NbrIti),
end;
if isdef('MaxDim','local')...
then Commandline=Commandline+' -M'+string(NbrComp)+','+string(MaxDim),
else Commandline=Commandline+' -M'+string(NbrComp)+','+string(Dim),
end;
if isdef('Dim','local')...
then Commandline=Commandline+' -m'+string(Dim),
end;
if isdef('MinEps','local')...
then Commandline=Commandline+' -r'+string(MinEps),
end;
if isdef('RatRef','local')...
then Commandline=Commandline+' -f'+string(RatRef),
end;
if isdef('TheWin','local')...
then Commandline=Commandline+' -t'+string(TheWin),
end;
if isdef('Delai','local')...
then Commandline=Commandline+' -d'+string(Delai),
end;
// Utilisation de Lyap_K from TiSeAn
if isdef('orbit','local')...
then
mdelete('tmp')
write('tmp',string(orbit)),
Commandline=' tmp'+Commandline+' -c'+string(NbrComp)+' -otmpout.dat',
end;
mdelete('tmpout.dat')
Commandline='false_nearest'+Commandline,
// Reading the output
x=host(Commandline);
if x~=0...
then
disp('Erreur!!! Fichier ou Tisean manquant');
return;
end;
x=read('tmpout.dat',-1,1,'(a)');
x=evstr(x);
dim=x(:,1);
FalseNberFrac=x(:,2);
NberSize=x(:,3);
NberSize2=x(:,4);
endfunction
sci/lyap_spec.sci
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
function [dim,FalseNberFrac,NberSize,NberSize2]=lyap_spec(orbit,NbrIti,Dim, MinEps,RatRef, NbrTimeIti,NbrRef,MaxDim, TheWin)
// Initialisation
Commandline='';
NbrComp=size(orbit,2);
if ~isdef('DoEstim','local')...
then DoEstim=%F,
end;
if isdef('NbrIti','local')...
then Commandline=Commandline+' -l'+string(NbrIti),
end;
if isdef('Dim','local')...
then Commandline=Commandline+' -m'+string(NbrComp)+','+string(Dim),
end;
if isdef('Dim','local')...
then Commandline=Commandline+' -m'+string(Dim),
end;
if isdef('NbrRef','local')...
then Commandline=Commandline+' -k'+string(NbrRef),
end;
if isdef('NbrTimeIti','local')...
then Commandline=Commandline+' -n'+string(NbrTimeIti),
else NbrTimeIti=50;
end;
if isdef('MinEps','local')...
then Commandline=Commandline+' -r'+string(MinEps),
end;
if isdef('RatRef','local')...
then Commandline=Commandline+' -f'+string(RatRef),
end;
if isdef('TheWin','local')...
then Commandline=Commandline+' -t'+string(TheWin),
end;
// Utilisation de Lyap_K from TiSeAn
if isdef('orbit','local')...
then
mdelete('tmp')
write('tmp',string(orbit)),
Commandline=' tmp'+Commandline+' -c'+string(NbrComp)+' -otmpout.dat',
end;
mdelete('tmpout.dat')
Commandline='false_nearest'+Commandline,
// Reading the output
x=host(Commandline);
if x~=0...
then
disp('Erreur!!! Fichier ou Tisean manquant');
return;
end;
x=read('tmpout.dat',-1,1,'(a)');
x=evstr(x);
dim=x(:,1);
FalseNberFrac=x(:,2);
NberSize=x(:,3);
NberSize2=x(:,4);
endfunction
sci/makenoise.sci
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
function [x]=makenoise(orbit,NoisePerc,NoiseAbs,Gaussian,Creat,Grain)
// Initialisation
Commandline='';
NbrComp=size(orbit,2);
if isdef('NoisePerc','local')...
then Commandline=Commandline+' -%'+string(NoisePerc),
end;
if isdef('NoiseAbs','local')...
then Commandline=Commandline+' -r'+string(NoiseAbs),
end;
if isdef('Gaussian','local')...
then Commandline=Commandline+' -g',
end;
if isdef('Creat','local')...
then Commandline=Commandline+' -O',
end;
if isdef('Grain','local')...
then Commandline=Commandline+' -I'+string(Grain),
end;
// Utilisation de Lyap_K from TiSeAn
if isdef('orbit','local')...
then
mdelete('tmp')
write('tmp',string(orbit)),
Commandline=' tmp'+Commandline+' -c'+string(NbrComp)+' -otmpout.dat',
end;
mdelete('tmpout.dat')
Commandline='makenoise'+Commandline,
// Reading the output
x=host(Commandline);
if x~=0...
then
disp('Erreur!!! Fichier ou Tisean manquant');
return;
end;
x=read('tmpout.dat',-1,1,'(a)');
x=evstr(x);
endfunction
sci/mutual.sci
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
function [Del,MutulaInf,OccupBox,ShanEnt]=mutual(orbit,NbrIti,Delai, NbrBox)
// Initialisation
Commandline='';
NbrComp=size(orbit,2);
if ~isdef('DoEstim','local')...
then DoEstim=%F,
end;
if isdef('NbrIti','local')...
then Commandline=Commandline+' -l'+string(NbrIti),
end;
if isdef('NbrBox','local')...
then Commandline=Commandline+' -b'+string(NbrBox),
end;
if isdef('Delai','local')...
then Commandline=Commandline+' -D'+string(Delai),
end;
// Utilisation de Lyap_K from TiSeAn
if isdef('orbit','local')...
then
mdelete('tmp')
write('tmp',string(orbit)),
Commandline=' tmp'+Commandline+' -c'+string(NbrComp)+' -otmpout.dat',
end;
mdelete('tmpout.dat')
Commandline='mutual'+Commandline,
// Reading the output
x=host(Commandline);
if x~=0...
then
disp('Erreur!!! Fichier ou Tisean manquant');
return;
end;
x=read('tmpout.dat',-1,1,'(a)');
y=x(3:$);
y=evstr(y);
Del=y(:,1);
MutulaInf=y(:,2);
OccupBox=(x(1,1));
ShanEnt=(x(2,1));
endfunction
sci/nstat_z.sci
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
function [forecast,forcasted,err]=nstat_z(orbit,NbrIti,Dim,Delai, NbrSeg)
// Initialisation
Commandline='';
NbrComp=size(orbit,2);
if ~isdef('DoEstim','local')...
then DoEstim=%F,
end;
if isdef('NbrIti','local')...
then Commandline=Commandline+' -l'+string(NbrIti),
end;
if isdef('Dim','local')...
then Commandline=Commandline+' -m'+string(Dim),
end;
if isdef('NbrSeg','local')...
then Commandline=Commandline+' -#'+string(NbrSeg),
end;
if isdef('Delai','local')...
then Commandline=Commandline+' -d'+string(Delai),
end;
// Utilisation de Lyap_K from TiSeAn
if isdef('orbit','local')...
then
mdelete('tmp')
write('tmp',string(orbit)),
Commandline=' tmp'+Commandline+' -c'+string(NbrComp)+' -otmpout.dat',
end;
mdelete('tmpout.dat')
Commandline='nstat_z'+Commandline,
// Reading the output
x=host(Commandline);
if x~=0...
then
disp('Erreur!!! Fichier ou Tisean manquant');
return;
end;
x=read('tmpout.dat',-1,1,'(a)');
x=evstr(x);
forecast=x(:,1);
forcasted=x(:,2);
err=x(:,3);
endfunction
sci/orb.sci
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
function [orbit]=orb(NbrItir,c,x0,f,RatCalc,DoPlot)
if ~isdef('DoPlot','local')...
then DoPlot=%F,
end;
if ~isdef('NbrItir','local')...
then NbrItir=1000,
end;
if ~isdef('c','local')...
then c=0,
end;
orbit=[]
x=[]
if ~isdef('RatCalc','local')...
then
if ~isdef('f','local')...
then deff('[Xn]=f(Xn_1,c)','Xn=Xn_1^2+c')
end;
if ~isdef('x0','local')...
then x0=[0]
end;
for i=1:size(x0,2)
x=[x0(1,i)]
for j=1:NbrItir
x=[x f(x(1,j),c)]
end
orbit=[orbit;x]
end
if DoPlot...
then
clf
plot2d(x0,orbit(:,$-100:$),-1*ones(1:size(orbit(:,$-100:$),2)))
end
else
if ~isdef('f','local')...
then deff('[xn]=f(xn_1,c)'...
,'z=xn_1;...
if (horner(z(1,1).num,1)>=0)&(horner(z(1,1).num,1)*2<horner(z(1,1).den,1))...
xn(1,1)=z(1,1)*2;...
end;...
if (horner(z(1,1).num,1)*2>=horner(z(1,1).den,1))&(horner(z(1,1).num,1)<horner(z(1,1).den,1))...
xn(1,1)=z(1,1)*2-1;...
end;')
end,
if ~isdef('x0','local')...
then
xnum=poly(1,'s',['coeff'])
xnum=(0:9)*xnum
xden=poly(1,'s',['coeff'])
xden=ones(0:9)*10*xden
x0=xnum./xden
end,
for i=1:size(x0,2)
x=[x0(1,i)]
for j=1:NbrItir
x=[x f(x(1,j),c)]
end
orbit=[orbit;x]
end
if DoPlot...
then
clf
plot2d(horner(x0,1),horner(orbit(:,$-100:$),1),-1*ones(1:size(horner(orbit(:,$-100:$),1),2)))
end
end,
endfunction;
sci/poincare.sci
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
function [x]=poincare(orbit,NbrIti,Dim,Delai, CrossDirect, CrossAxe, Crosspos)
// Initialisation
Commandline='';
NbrComp=size(orbit,2);
if isdef('NbrIti','local')...
then Commandline=Commandline+' -l'+string(NbrIti),
end;
if isdef('Dim','local')...
then Commandline=Commandline+' -m'+string(Dim),
end;
if isdef('CrossDirect','local')...
then Commandline=Commandline+' -C'+string(CrossDirect),
end;
if isdef('Delai','local')...
then Commandline=Commandline+' -d'+string(Delai),
end;
if isdef('CrossAxe','local')...
then Commandline=Commandline+' -q'+string(CrossAxe),
end;
if isdef('Crosspos','local')...
then Commandline=Commandline+' -a'+string(Crosspos),
end;
// Utilisation de Lyap_K from TiSeAn
if isdef('orbit','local')...
then
mdelete('tmp')
write('tmp',string(orbit)),
Commandline=' tmp'+Commandline+' -c'+string(NbrComp)+' -otmpout.dat',
end;
mdelete('tmpout.dat')
Commandline='poincare'+Commandline,
// Reading the output
x=host(Commandline);
if x~=0...
then
disp('Erreur!!! Fichier ou Tisean manquant');
return;
end;
x=read('tmpout.dat',-1,1,'(a)');
x=evstr(x);
endfunction
sci/stp.sci
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
function [x]=stp(orbit,NbrIti,Dim,Delai, ResTemps, EtapTemp, EtapFarc)
// Initialisation
Commandline='';
NbrComp=size(orbit,2);
if ~isdef('DoEstim','local')...
then DoEstim=%F,
end;
if isdef('NbrIti','local')...
then Commandline=Commandline+' -l'+string(NbrIti),
end;
if isdef('EtapTemp','local')...
then Commandline=Commandline+' -t'+string(EtapTemp),
end;
if isdef('Dim','local')...
then Commandline=Commandline+' -m'+string(Dim),
end;
if isdef('MinEps','local')...
then Commandline=Commandline+' -r'+string(MinEps),
end;
if isdef('ResTemps','local')...
then Commandline=Commandline+' -#'+string(ResTemps),
end;
if isdef('EtapFarc','local')...
then Commandline=Commandline+' -%'+string(EtapFarc),
end;
if isdef('Delai','local')...
then Commandline=Commandline+' -d'+string(Delai),
end;
// Utilisation de Lyap_K from TiSeAn
if isdef('orbit','local')...
then
mdelete('tmp')
write('tmp',string(orbit)),
Commandline=' tmp'+Commandline+' -c'+string(NbrComp)+' -otmpout.dat',
end;
mdelete('tmpout.dat')
Commandline='stp'+Commandline,
// Reading the output
x=host(Commandline);
if x~=0...
then
disp('Erreur!!! Fichier ou Tisean manquant');
return;
end;
x=read('tmpout.dat',-1,1,'(a)');
x=evstr(x);
endfunction
sci/surrogates.sci
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
function [x]=surrogates(orbit,NbrIti,ExactSpect,Grain)
// Initialisation
Commandline='';
NbrComp=size(orbit,2);
if isdef('NbrIti','local')...
then Commandline=Commandline+' -i'+string(NbrIti),
end;
if isdef('NbSurr','local')...
then Commandline=Commandline+' -n'+string(NbSurr),
end;
if isdef('CrossDirect','local')...
then Commandline=Commandline+' -C'+string(CrossDirect),
end;
if isdef('ExactSpect','local')...
then Commandline=Commandline+' -s',
end;
if isdef('Grain','local')...
then Commandline=Commandline+' -I'+string(Grain),
end;
// Utilisation de Lyap_K from TiSeAn
if isdef('orbit','local')...
then
mdelete('tmp')
write('tmp',string(orbit)),
Commandline=' tmp'+Commandline+' -c'+string(NbrComp)+' -otmpout.dat',
end;
mdelete('tmpout.dat')
Commandline='surrogates'+Commandline,
// Reading the output
x=host(Commandline);
if x~=0...
then
disp('Erreur!!! Fichier ou Tisean manquant');
return;
end;
x=read('tmpout.dat',-1,1,'(a)');
x=evstr(x);
endfunction

Archive Download the corresponding diff file

Branches