Getting Started
In this tutorial we will walk through the steps required to install xolotl
and make sure everything works well. You will need:
- MATLAB (
xolotl
will not work on GNU Octave) - The parallel computing toolbox (for running simulations in parallel)
- The Signal Processing toolbox (for some analysis code)
- Global Optimization toolbox (to fit models to data)
- An internet connection
Installing xolotl¶
Download xolotl here and drag the downloaded file (xolotl.mltbx
) onto your MATLAB workspace. MATLAB should automatically open a prompt asking you if you want to install it.
Note
There are other ways to install xolotl. For example, you can download via git. Instructions here
Then we need to install a C/C++ compiler, and get MATLAB to work with that. Follow these instructions based on your operating system:
Installing a compiler¶
macOS¶
- Install XCode
- Open XCode, and accept the license agreement.
Windows¶
- Download and install the MinGW compiler from the Mathworks FileExchange. You'll need to log in using a Mathworks account. This ridiculous restriction is Mathworks' fault.
Note
You can also get the compiler as a MATLAB "add-on."
GNU/Linux¶
- Use your favorite package manager to install a C and C++ compiler. For example, on Debian-based systems, use
sudo apt install gcc & sudo apt install g++
- Verify that your compiler is on the MATLAB path by running
system('which gcc')
from within MATLAB
Configuration¶
Configure MATLAB to use compilers¶
Run this in your MATLAB terminal:
mex -setup c++
mex -setup c
You should see something like this:
% This is what you'll see on macOS. The precise message
% may be different on other operating systems
MEX configured to use 'Xcode Clang++' for C++ language compilation.
MEX configured to use 'Xcode with Clang' for C language compilation.
Note
Setting up a compiler for MATLAB can be tricky. See our more detailed advice here.
Verify your installation¶
OK, let's make sure everything works. Copy and paste the following code into your MATLAB terminal:
xolotl.go_to_examples
demo_bursting_neuron
You should see this plot appear:
Note
If you don't see this plot, or see some horrible error message, click on this link so we can figure out what went wrong