Next: Curve file Up: Software Previous: System definition   Contents


Continuation and output

The syntax of the continuer is:

[x,v,s,h,f] = cont(@curve, x0, v0, options);

curve is a MATLAB m-file where the problem is specified (cf. section 4.2). Evaluating a function by means of a function handle replaces the earlier matlab mechanism of evaluating a function through a string containing the function name.
x0 and v0 are respectively the initial point and the tangent vector at the initial point where the continuation starts.
options is a structure as described in section 4.4.1.
The arguments v0 and options can be omitted. In this case the tangent vector at x0 is computed internally and default options are used.

The function returns a series of matrices:

x and v are the points and their tangent vectors along the curve. Each column in x and v corresponds to a point on the curve.

s is an array with structures containing information about the found singularities. Its first and last elements always refer to the first and last points of the curve, respectively, since for convenience these are also considered ßpecial".

This structure has the following fields:

s.index index of the singularity point in x, so s(1).index is always equal to 1 and
s(end).index is the number of computed points.
s.label label of the singularity; by convention s(1).label is "00" and s(end).label is
"99".
s.msg an array of strings that may contain any information which is useful for the user,
for example the full name of the detected special point.
s.data an array of structures. For each special point it contains fields with additional
information, depending on the type of point. For example, there can be fields for
normal form coefficients. In the case of branch points, it contains information
that allows to distinguish the öld" branch on which the point was found from
the "new" branch to which the user might wish to switch in another run.



h contains some information on the continuation process. Its columns are related to the computed points, and have the following components:

Stepsize Stepsize used to calculate this point (zero for initial
point and singular points)
Number of Newton iterations For singular points this is the number of locator iterations
User function values The values of all active user functions
Test function values The values of all active test functions



f contains different information, depending on the continuation run. For noncycle-related continuations, the f-vector just contains the eigenvalues, if asked for. For limit cycle continuations, it begins with the mesh points of the time- discretization, followed by, if they were asked for, the PRC- and dPRC-values in all points of the periodic orbit (cf. section ). Then, if required, follow the multipliers.

It is also possible to extend the most recently computed curve with the same options (also same number of points) as it was first computed. The syntax to extend this curve is:

[x, v, s, h, f] = cont( x, v, s, h, f, cds);

x, v, s, h and f are the results of the previous call to the continuer and cds is the global variable that contains the curve description of the most recently computed curve (note that this variable has to be defined as global cds in teh calling method). The function returns the same output as before, extended with the new results.

In MatCont, all curves that have been computed using a specific system are stored in separate .mat-files, in a directory called diagram, under a subdirectory named after the system. For example, curves of the Connor system will be kept in .mat-files under the subdirectory Systems/Connor/diagram/. For continuation runs, each such mat-file contains the computed x,v,s,h,f arrays, plus the cds structure and a structure related to the curve type. Also, it contains the variables point, ctype and num. To understand their meaning, suppose that we are computing curves of limit cycles that we start from Hopf points. The first such computed curve then gets the name "H_LC(1)", point stores the string "H" and ctype stores the string "LC". Furthermore, num stores the index in s of the last selected point of the curve (the default is 1). The second curve of the same type is called "H_LC(2)" and so on. In fact, to save storage space, only a limited number of curves of a certain type is stored. This number can be set by the user and the default is 2. To save a computed curve permanently, the user must change its name.

For time integration runs, cf. § (Curve Type O) and § (Curve type DO), the mat-file contains ctype, option, param, point, s, t, x. Here t is the vector of time points and x is the corresponding array of computed points. s contains data on the first and last computed points. The meaning of point,ctype is similar to the case of continuation curves. Finally, param is the vector of parameters of the ODE (constant during time integration) and option is a structure that contains optional settings for time integration.

To export the computed results of a system to a different installation of MatCont one has to copy the corresponding m-file, the mat-file and the directory of the system.

These files also contain all information needed to export the computed results to the general matlab environment, so MatCont is really an open system.

MatCont also produces graphical output. 2D and 3D graphs are plotted in matlab figure windows. Such a graph can be handled as any other graph that is produced in matlab. It can be selected using the arrow-function of the matlab figure, and the line width, line style and colour can be altered. Markers can be set on the curve. It can be copy-pasted into another matlab figure. In a figure, textboxes can be inserted and axes labels can be added. Thus the user has a plethora of possibilities to combine different MatCont output graphs into one figure.

Finally, we note that users often want to introduce new systems that are modifications of existing systems, but with slightly different sets of state variables and/or parameters. The best strategy to do this in MatCont is first to edit the existing system, change its name to a new one and click "OK" to build an m-file with a different name and no associated directory of computed curves. Afterwards, one can edit the newly created system, make all desired changes and click "OK" again.