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

xpp passive.odewhere

- The main window with all of the commands
- The parameter window with the names of the parameters and their current values
- The initial data window with the variables and their current values
- The delay window (ignore this for now)
- The boundary condition window (ignore this too)
- The equation window (lists the equations)
- 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

- "Total" Clicking on this lets you set the total amount of time for
the integration. The default is 20.
- "Dt" This is the time step for integrating the equations. Smaller
steps take longer but are more accurate. The default is 0.05
- "Bounds" This sets the total magnitude that any trajectory can take.
The integration is stopped if the bounds are exceeded. Increase it if
you want; the default is 100.
- "Ncline control" This controls the grid for nullcline computation.
Increase it for finer nullclines. The default is 40.
- "Method" This is the method of integration. The only ones of
interest to you are:
- Euler
- Modified Euler
- Runga Kutta
- Adams-Bashforth
- Gear
- Backward Euler

The first two are fast and inaccurate. The next two are more accurate and the last is the most accurate but requires additional input and the backward Euler is stable but fairly fast.

- "Esc-exit" This takes you back to the main menu.

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

Mon Jan 5 13:18:36 EST 1998