TISEAN package: Difference between revisions

972 bytes added ,  9 June 2015
→‎Finding Unstable Periodic Orbits: updated with plotting code
(→‎Tutorials: adding Finding unstable periodic orbits tutorial)
(→‎Finding Unstable Periodic Orbits: updated with plotting code)
Line 32: Line 32:
{{Code|Finding unstable periodic orbits|<syntaxhighlight lang="octave" style="font-size:13px">
{{Code|Finding unstable periodic orbits|<syntaxhighlight lang="octave" style="font-size:13px">
# Create maps
# Create maps
hen       = henon (1000);
hen             = henon (1000);
hen_noisy = hen + std (hen) * 0.02 .* (-6 + sum (rand ([size(hen), 12]), 3));
hen            = hen + std (hen) * 0.02 .* (-6 + sum (rand ([size(hen), 12]), 3));
# Find orbits
# Find orbits
up        = upo(hen(:,1), 2, 'p',6,'v',0.1, 'n', 100);
[lengths, data] = upo(hen(:,1), 2, 'p',6,'v',0.1, 'n', 100);
</syntaxhighlight>}}
</syntaxhighlight>}}
The vector {{Codeline|lengths}} contains the size of each of the found orbits and {{Codeline|data}} contains their coordinates. To obtain delay coordinates and plot these orbits onto the original data we will use {{Codeline|upoembed}}.
{{Code|Plotting unstable periodic orbits|<syntaxhighlight lang="octave" style="font-size:13px">
# Create delay coordinates for the orbits and data
up        = upoembed (lengths, data, 1);
delay_hen = delay (hen(:,1));
# Plot all of the data
plot (delay_hen(:,1), delay_hen(:,2), 'r.;Noisy Henon;','markersize',2,...
      up{4}(:,1), up{4}(:,2),'gx;Fixed Point;','markersize',20,'linewidth',1, ...
      up{3}(:,1), up{3}(:,2),'b+;Period 2;','markersize',20,'linewidth',1, ...
      up{2}(:,1), up{2}(:,2),'ms;Period 6;','markersize',20,'linewidth',1, ...
      up{1}(:,1), up{1}(:,2),'cs;Period 6;','markersize',20,'linewidth',1);
</syntaxhighlight>}}
The plotting options are passed to make the orbits more visible.


=== Nonlinear Prediction ===
=== Nonlinear Prediction ===
156

edits