Jessica Parker, March 14, 2021

This code is a model of episodic locomotor activity generated by the mouse spinal cord locomotor CPG.
You need to install gsl in order to run this code on a linux machine or a Mac. I can't get it to work
on a Windows computer. To install gsl on a linux computer cd into your home directory in the terminal
and enter the following lines into the terminal:

wget ftp://ftp.gnu.org/gnu/gsl/gsl-2.6.tar.gz
tar -zxvf gsl-2.6.tar.gz
cd gsl-1.7
mkdir /home/[your username]/gsl
./configure --prefix=/home/[your username]/gsl
make
make check
make install

You should now be able to run my C code. To do so, enter the directory that it is in, and just enter
the following lines into the terminal:
./compl
./run4HCO.exe

The file compl is a shell script that contains the compilation line that compiles the c code.You may have
to change the permissions of this file to make it executable. To do so enter the following line into
the terminal:
sudo chmod 777 compl

The code should be working now. The way the code is set up right now it will take about 15 minutes to
finish. But you can change the integration time in EpisodicLocomotion_main.c (tf1 and tf2) in order to
test it out faster.

You can change the model parameters in EpisodicLocomotion.h.

EpisodicLocomotion_main.c calls to EpisodicLocomotion_integrateNW.c in order to run for a long period of
time, tf1 (currently set to 5000 s), without saving this data to a file. EpisodicLocomotion_integrateNW.c
calls to EpisodicLocomotion_dy.c with the function func(), and this is where the equations are written and
where they are calculated at each integration step. 

EpisodicLocomotion_main.c then calls to EpisodicLocomotion_integrate.c in order to integrate and save the
data to Vall[run1]_[run2]_[run3]_[run4]_[run5]_[run6].dat and save the last point to
ip[run1]_[run2]_[run3]_[run4]_[run5]_[run6].txt, where run1-run6 are numbers initiated in
EpisodicLocomotion_main.c and used to name data files. You can change them to whatever you prefer

In order to do episode/burst analysis, run the matlab script runepisodeanalysisAslth.m which calls to the
function in episodeanalysisAslth.m. The matlab files beginning with 'plot' each plot either a different x axis
range or a different set of variables. You just need to make sure that the variables run1, run2, run3, run4,
run5, and run6 correspond to those used in the c code, and make sure that you enter the right number of variables
that were saved in your simulation data file when you are opening the file in matlab. Right now the data file
is set to include all 24 variables, and the matlab code corresponds to that.

Let me know if you have any questions!