Using the TISEAN package within Matlab

Contents

For the study of nonlinear systems and for nonlinear time series analysis we will need some programmes or tools. Some of the algorithms are available as Matlab functions or can be simply programmed for Matlab. However, some other are rather complex or are not yet available as Matlab functions. But most of them are available in the TISEAN package, which is a collection of small commandline programms for nonlinear data analysis. We need to install TISEAN on our computer for some tasks. This software package as well as the installation instructions can be found at http://www.mpipks-dresden.mpg.de/~tisean/TISEAN_2.1/index.html

Matlab offers a way to use systems commands and, hence, the commandline programms of TISEAN. At first let us define a variable with the path of the TISEAN installation

tiseanPath = 'C:\Programme\MATLAB6p5\work\Tisean\';
tiseanPath = '/usr/users4/marwan/1.work/4.TeXte/matlab-tutorials/';
tiseanPath = '';

Now let us use the TISEAN command henon in order to compute the Henon map. In Matlab, a system call is performed using the command system

a = 1.4;
system([tiseanPath,'henon -B0.3 -A',num2str(a),' -l1000 -o']);
x = load('henon.dat');

plot(x(:,1),x(:,2),'.')
TISEAN 2.1 (C) R. Hegger, H. Kantz, T. Schreiber

henon: Henon map
opened henon.dat for output

The argument of the system command is a string with the same content what we would type on the systems commandline

[tiseanPath,'henon -B0.3 -A',num2str(a),' -l1000 -o']
ans =

henon -B0.3 -A1.4 -l1000 -o

We can commit arguments to the TISEAN command by converting numerical values to strings with num2str. For example, to plot the bifurcation diagram, we run through a range of values of a

x = [];
for a = 0:.02:2
    system([tiseanPath,'henon -B0 -A',num2str(a),' -l200 -o -V0']);
    henonData = load('henon.dat');
    x = [x, henonData(:,1)];
end
plot(0:.02:2, x', 'k.')

Let us consider again the Henon system (but now computed using Matlab)

a = 2; b = 0;
x(1,1) = .91; x(1,2) = 0;
for i = 2:10001
    x(i,1) = 1 - a * x(i-1,1)^2 + b * x(i-1,2);
    x(i,2) = x(i-1,1);
end
x(1,:) = [];
save henon.dat x -ascii -tabs

% In order to compute the Lyapunov exponent using TISEAN we
% call

system([tiseanPath,'lyap_r -s20 -o lyap.dat henon.dat']);

l = load('lyap.dat');
plot(l(:,1),l(:,2))
TISEAN 2.1 (C) R. Hegger, H. Kantz, T. Schreiber

lyap_r: Estimates the maximal Lyapunov exponent; Rosenstein et al.

Using henon.dat as datafile, reading column 1
Line in file too long. Increasing input size
Use 10000 lines.
Opened lyap.dat for writing
epsilon: 2.000000e-03 already found: 9979

Note that some TISEAN programmes add heading lines to the output files and that the comment mark is # instead of %. This requires that we change the # sign to the % sign in order to import the file into Matlab.

Exercise

Use the TISEAN command poincare and create a Poincare map of the Henon map (10000 data points). Plot it within Matlab.