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

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.

There are two windows that accept commands and several other windows that are not for input but rather 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. Except for certain dialog boxes, all inputs such as values of parameters, etc are put entered in the command line at the top of the main window. To change initial conditions, click in the Initial Conditions window on the variable you wish to change. Then change it in the command line. Type <Enter> when done. If you do not pick the last variable, you will be prompted for all the remaining ones. You can just type <Enter> to accept the present value.

To run the simulation, click on the Initial Conds bar and then on Go, or type I 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''.

2. Changing parameters. The parameters can be changed like the initial conditions by clicking on them in the parameter window. After changing one parameter, you will not be prompted for others. You will instead be asked for another parameter. Type <Enter> to get out of this or type in another parameter or click on another 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

There are other that may be of use; read the full doc for them. At this point you may want to run the full tutorial.


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.)

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

Bard Ermentrout
Mon Jan 5 13:18:36 EST 1998