next up previous
Next: The passive cable equation Up: Numerical solution of passive Previous: Writing an ODE file

Running the simulation

Create this file with your editor and fire up XPPAUT with the following command:

xpp passive.ode
where passive.ode is the file name. If the program typed in is OK, then a series of 7 windows will be created. If you are using TWM (the manager on an xterm or the NeXT) you must click where you want the windows. The seven windows are:
1.
The main window with all of the commands
2.
The parameter window with the names of the parameters and their current values
3.
The initial data window with the variables and their current values
4.
The delay window (ignore this for now)
5.
The boundary condition window (ignore this too)
6.
The equation window (lists the equations)
7.
The data browser. This lets you look at the numbers and manipulate them like a spreadsheet.

(NOTE. Some Window managers (fvwm) produce dead windows instead of iconified windows. To resurrect these windows, iconify them manually and then uniconify them and they will spring back to life!) There are two windows that accept commands and several other windows that are for input and/or inform you about parameters, boundary conditions, and initial conditions. The main window is for most of the commands and the browser window is the ``spreadsheet'' for viewing, saving, and manipulating the numbers. The main things one wants to do are:


1. Integrating the equations and changing initial data. All of the commands in xpp have keyboard shortcuts so that you can avoid using the mouse. To change initial conditions and parameters, click in the appropriate window and change the value. When you are happy with the values, just click the OK button to tell XPP. You can also change initial conditions from the Command Window (the top line of the main window - thers is no analogue in Win95.) Similarly, you can click on the Parameters item in the main menu and type the name of the parameter you want to change and then give it a value. Type Enter a few times to exit this mode.

To run the simulation, click on the Initial Conds menu and then on Go, or type I G. (In Win95 click on Run Go or Ctrl G) The trajectory is invisible since the window only goes from -1 to 1. To get a bigger window, click on the ``Window'' bar and then on ``Window'' or type W W. A new window will appear in which you can specify the max and min of your axes. Click on OK when you are done and the data will be redrawn in the new window. There are two quicker ways to do it. Click on ``X vs T'' and choose V as the variable to plot versus time. The window will automatically be redrawn and fitted. Alternatively, use the ``Window'' command but then click on ``Fit''. (In Win95 use the Graphics View or Graphics Fit or Graphics XvsT).


2. Changing parameters. The parameters can be changed like the initial conditions by changing them in the parameter window. Another way to change parameters is to click on "Parameter" in the main window or type "P" the keyboard shortcut. Hit <Enter> repeatedly to exit this mode. Change some of the parameters and reintegrate.


3. Changing numerical parameters. Click on "nUmerics" or type "U" to get a new menu. The main items of interest are

In Win95 click on Numerics Int Params to get a window with most of the useful numerical parameters. There are others that may be of use; read the full doc for them. At this point you may want to run the full tutorial.

TO QUIT! click on File Quit Yes in X and Ctrl Q or File Quit in Win95.

HOMEWORK
In the compartmental model above, change the current stimulus to be a sinusoid with frequency of 40 Hz and plot the solution for 200 msec. Use Dt=.2. To do this, you will have to modify the ODE file. Please print out the ODE file and also make a copy of your solution. (Use the postscript option under graphics.) (Instead of editing the file, you can edit the right-hand sides, replacing f(t) with a sinusoid, sin(2*pi*t/25).


next up previous
Next: The passive cable equation Up: Numerical solution of passive Previous: Writing an ODE file
G. Bard Ermentrout
1/10/1998