Skip to content

Getting Started

In this tutorial we will walk through the steps required to install xolotl and make sure everything works well. You will need:

  1. MATLAB (xolotl will not work on GNU Octave)
  2. The parallel computing toolbox (for running simulations in parallel)
  3. The Signal Processing toolbox (for some analysis code)
  4. Global Optimization toolbox (to fit models to data)
  5. 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.


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


  1. Install XCode
  2. Open XCode, and accept the license agreement.


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


You can also get the compiler as a MATLAB "add-on."


  1. 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++
  2. Verify that your compiler is on the MATLAB path by running system('which gcc') from within MATLAB


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.


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:


You should see this plot appear:


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