Using Drake from MATLAB

MATLAB code/bindings available in Drake are unit tested on MATLAB R2017a. Other MATLAB versions may work (namely R2016a or above) but are not officially supported.

We are currently experimenting with a few solutions for implementing the MATLAB bindings for Drake’s new C++ libraries. You will find minimal examples available in master, but most are not available yet. Stay tuned for more information.

In the meantime, Using Drake from Python may also prove useful.

Building the MATLAB Bindings

export PATH=/usr/local/MATLAB/R2017a/bin:$PATH  # Ubuntu
git clone
mkdir drake-build
cd drake-build
cmake -DWITH_MATLAB=ON ../drake


On Ubuntu, you may encounter an error similar to the following:

/usr/local/MATLAB/R2017a/bin/glnxa64/../../sys/os/glnxa64/ version `GLIBCXX_3.4.21' not found.

If so, modify your MATLAB installation as follows:

cd /usr/local/MATLAB/R2017a/sys/os/glnxa64
sudo rm
sudo ln -s /usr/lib/x86_64-linux-gnu/
sudo ln -s /usr/lib/x86_64-linux-gnu/
sudo ln -s /usr/lib/x86_64-linux-gnu/

Original MATLAB

Prior to 2016, Drake was built around a substantial base of MATLAB software. Most of that was removed from the head of git master during 2017.

To view or use the original MATLAB implementation, you may use this tag: