Getting started

On this page you can download the latest version of OpenOCL. You can find older versions here.

Windows (Matlab > R2016a, 64bit) and
Linux (Matlab > R2014b, 64bit)
Other (requires two steps)
Matlab .mltbx package (easiest way) Get and setup CasADi (step 1)
Matlab code as zip (you have to setup the path manually) Matlab code as zip (step 2, you have to setup the path manually)

Matlab .mltbx package installation and execution

With the Matlab .mltbx package you are ready to go, just double click on the file and Matlab will install the packages as an Add-on.

Then run an example by typing


in your command window.

If the file ending .mltbx is not associated with Matlab, open Matlab navigate to the .mltbx file, and right click within Matlab on the file and install the toolbox.

Installing .mltbx Matlab toolbox

During the first run, the toolbox will ask to download necessary software (CasADi). Confirm by typing y and pressing [enter].

First run confirmation message

Then these two plots should show up:

First run cart pole plots

To have a look at the code, type

open mainCartPole

Open Cartpole example code

Matlab code as zip

If you have downloaded the Matlab code, you need to unzip the downloaded folder, and navigate to it. Then run an example, e.g.


If you would like to save your path using savepath or the Matlab path manager, add the main folder of OpenOCL without subfolders, and save the path. It is best to save the path before running StartupOCL so that the sub-directories of OpenOCL will not be saved to the path (by executing StartupOCL some folder will be added to the path).

Other configurations

If you have another configuration you need to setup CasADi manually.

Here is a step-by-step guide:

If you would like to save your path using savepath or the Matlab path manager, do this before running StartupOCL in order to not include the sub-directories.

Let us know if you run into any problems at!