Next: Maple programs for plotting Previous: Program appearance and Controls

# File formats

## Introduction

This section describes the file formats for the different kinds of data files that can be read or saved using xrk. Most users will not need this information right away, but it is useful in the following situations.

• The user wants to use another program, e.g. Maple, Mathematica, or Matlab, to plot solutions saved in xrk\ snapshot files. The xrk program is not set up to produce hard-copy graphics, mainly because superior tools for doing so already exist.
• The user wants to write xrk files manually.

The table below summarizes the four different classes of data files associated with xrk. Specifically, the last column in the table shows what values are contained in each file.

The tutorial contains examples of reading and saving these data files.

## Conventions used

Before describing each of the file formats in detail, we introduce some helpful notation.

Note that the convention is for subscripts to start at 0 rather than 1. This is to keep the notation in this section consistent with that in the program.

## Parameter files

These files contain the npar values of the model parameters and have the extension .par by default. The file format is as follows. The first line contains the value of npar. The second line contains the value of . The next line contains the value of , and so on, up to , as shown below.

If npar doesn't match the number of parameters in the current model, a warning dialog appears and the parameter values are not changed. The program also checks to make sure that the correct number of values are read from the file. If this doesn't happen, a warning dialog appears and the parameter values are not changed.

## Complete set

As the name implies, these files contain a complete set of parameter values and initial conditions. By default, these files have the extension .set. The file format is that obtained by adding the initial conditions to a parameter file, as shown schematically below.

The program checks that npar and N match the current model. It also checks that the correct number of parameter values and intial conditions are read in. If any of these checks fail, a warning dialog appears and the parameter values and initial conditions are not changed.

## Snapshot files

Snapshot files contain a sequence of values at equally spaced time intervals. These files are output only and cannot be read into xrk. They are intended for use with a separate plotting program to produce two-dimensional plots of . Suppose that there are L+1 equally spaced values of time, , k=0, L. Then a snapshot file consists of L+1 lines of values of separated by blank lines. For the sake of convenience, each line also contains the time value . The file format is shown schematically below,

By convention, .

Next: Maple programs for plotting Previous: Program appearance and Controls

William W. Farr
Fri Oct 25 13:53:45 EDT 1996