156
edits
(→Finding Unstable Periodic Orbits: added picture of plot) |
(→Tutorials: added 'Lyapunov Exponents') |
||
Line 118: | Line 118: | ||
Once both results are compared it is quite obvious that for this particular example {{Codeline|ghkss}} is superior to {{Codeline|lazy}}. The TISEAN documentation points out that this is not always the case. | Once both results are compared it is quite obvious that for this particular example {{Codeline|ghkss}} is superior to {{Codeline|lazy}}. The TISEAN documentation points out that this is not always the case. | ||
[[File:tisean_nl_noisereduction_2.png|400px|center]] | [[File:tisean_nl_noisereduction_2.png|400px|center]] | ||
=== Lyapunov Exponents === | |||
Here I will demonstrate how to use the function {{Codeline|lyap_k}}. It create Lyapunov Exponents for a time series (more information available [http://www.mpipks-dresden.mpg.de/~tisean/Tisean_3.0.1/docs/chaospaper/node27.html here]). In this tutorial we will create a Lyapunov Exponent for various embedding dimensions and then plot them. | |||
{{Code|Creating Lyapunov exponents|<syntaxhighlight lang="octave" style="font-size:13px"> | |||
# Create time series | |||
in = sin((1:2500).'./360) + cos((1:2500).'./180); | |||
# Create Lyapunov exponents | |||
mmax_val = 20 | |||
lyap_exp = lyap_k (in, 'mmin',2,'mmax',mmax_val,'d',6,'s',400,'t',500); | |||
</syntaxhighlight>}} | |||
In this function the output ({{Codeline|lyap_exp}} is a {{Codeline|5 x 20}} struct array. We will only use one row for the plot. | |||
{{Code|Plotting Lyapunov exponents|<syntaxhighlight lang="octave" style="font-size:13px"> | |||
cla reset | |||
hold on | |||
for j=2:mmax_val | |||
plot (lyap_exp(1,j-1).exp(:,1),lyap_exp(1,j-1).exp(:,2),'r'); | |||
endfor | |||
xlabel ("t [flow samples]"); | |||
ylabel ("S(eps, embed, t)"); | |||
hold off | |||
</syntaxhighlight>}} | |||
[[Category:Octave-Forge]] | [[Category:Octave-Forge]] |
edits