One-parameter continuation with MatCont
Hello, dear friend, you can consult us at any time if you have any questions, add WeChat: THEend8_
MATH3888 M-Lab 5:
One-parameter continuation with MatCont
The purpose of this M-Lab is to familiarise ourselves with the numerical bifurcation package
MatCont.1 By the end of the M-lab you should know how to:
(i) Define a system of ODEs in MatCont;
(ii) Numerically ‘integrate’ solutions using standard numerical ODE solvers;
(iii) Visualise solutions graphically, as well as numerically;
(iv) Identify equilibria numerically;
(v) Numerically ‘continue’ equilibria and limit cycles in 1 parameter.
We assume that MATLAB and MatCont are already installed on your personal computer.
If they are not, do this now by following the installation steps outlined in the “Installing
MatCont” document available on the course webpage (Ed Resources).
To open MatCont, first open MATLAB, make sure that the current working folder is your
MatCont folder, and type ‘matcont’ into the MATLAB command line. A window titled
‘MatCont GUI’ should appear.
1 Example: the FitzHugh-Nagumo model
We are now going to define a system of ODEs in MatCont. We will use the FHN model
dv
dt
= (f(v)− w + Iapp)/ε
dw
dt
= v − γw − v0,
(1)
with
f(v) = v(1− v)(v − 0.2)
and the parameter set
ε = 0.2, Iapp = 0, γ = 1, v0 = 0 ,
which you all studied with BDToolbox last week.
1These notes are primarily a compilation of notes by Yu. A. Kuznetsov (Utrecht University) and
N. Neirynck (Ghent University), which can be found at https://webspace.science.uu.nl/~kouzn101/NBA/
1
1.1 Defining a system of ode’s
In the MatCont GUI, click on ‘Select’, then ‘System’, then ‘new’. Hereafter we will write a
sequence of commands like this as Select|System|New. This opens the System window,
which contains several fields and buttons. To identify the system, type for example
FHN
in the Name field (it must be one word).
Input names of the Coordinates: w,v, the Parameters: Iapp,epsilon,gamma,v0 and
the name for the Time: t (default).
If shown, select symbolic generation of the 1st, 2nd and 3rd order derivatives2; see Figure
1.
Figure 1: Specifying a new model.
Finally, in the large input field, enter the FitzHugh-Nagumo system as
w’=v-gamma*w-v0
v’=(v*(1-v)*(v-0.2)-w+Iapp)/epsilon
Avoid typical mistakes:
• Make sure to write multiplication with a *.
• Specify differential equations in the same order that you specify coordinates.
Your system should look as the one in Figure 1. Once it does, press OK. Assuming
you made no typing mistakes, the System window disappears, and you will see in the main
2Symbolic computation of derivatives is usually preferred for ‘simple enough’ systems. For the systems we
consider, choosing symbolic computation of 1st, 2nd and 3rd (but not 4th and 5th) is a pretty good rule of
thumb for good numerical performance.
2
MatCont window that FHN becomes the current System of MatCont. If selected, the
information field Derivatives shows the string SSSNN meaning that the symbolic 1st, 2nd
and 3rd order derivatives of the RHS will be used.
If you want to edit an existing system, click Select|Systems|Edit/Load/Delete, select
this system in the appearing Systems window, and press Edit button. The inputed system
can be completely erased by selecting Action|Delete there.
1.2 Selection of solution type
To tell MatCont that we want to integrate the system, i.e., to numerically solve the ini-
tial value problem for it, we have to specify the type of the initial point and the type of
the curve to compute. To select the initial point type, input Type|Initial Point|Point,
which means that the initial point has no special properties. To select the curve type, click
Type|Curve|Orbit. The information fields in the MatCont main window will reflect the
selections, and two more windows appear. These are the corresponding Starter and Inte-
grator windows. Move them, if necessary, to make both visible.