next up previous
Next: Running a simulation Up: No Title Previous: No Title

Entering an equation

To use XPPAUT , you must first create an equation file which tells the program what the equations, functions, and parameters are. Typically, these files have names like myfile.ode.The extension ``ode'' is not important, but it reminds you that it is an XPPAUT file. We will start with the logistic equation

xn+1 = rxn(1-xn).

Here is the ODE file for it
# logistic equation
x'=r*x*(1-x)
# parameter
par r=2.5
# initial condition
init x=.2
# tell XPP it is a discrete equation
@ meth=discrete
# tell it to use 200 points
@ total=200
done
Type this file as an ASCII text file and save it. Or just grab it here. The lines starting with # are comments. Most everything can be changed from within the program. However, the dimensions, names, etc cannot be altered. The file is typed in pretty much the same way you would if you were writing the equations; XPP is too stupid to recognize spaces for multiplication, so you have to put the ``*'' sign between quantities. Functions such as am(V) are defined in the obvious fashion. Parameters are declared with the par statement. They can be separated by spaces or commas. The ``='' sign, the parameter name, and its starting value must have NO spaces between them.

THIS IS WRONG:

par gl = .3

THIS IS RIGHT:

par gl=.3

Initial data can be defined with the init statement. Each file must end with a done statement. Any line that starts with a # is a comment and ignored.


next up previous
Next: Running a simulation Up: No Title Previous: No Title
G. Bard Ermentrout
1999-09-17