Skip to Search Skip to Navigation Skip to Content

MATLAB Compiling Guide

MATLAB provides the ability to compile MATLAB functions into native executables. This is ideal for MATLAB codes that are suitable for grid type deployments, where there are many independent units of work that can be submitted to a cluster such as the CBI Linux cluster via the Sun Grid Engine scheduler. The key benefit is that the compiled executable does not require MATLAB licenses to run, enabling large scale distributed jobs to run without interfering with other users' ability to use MATLAB. In addition, this makes it possible to distribute MATLAB algorithms to others that may not have a MATLAB license.

The compiled executable dynamically links to the runtime library provided by Mathworks called the MCR (MATLAB Compiler Runtime). This library contains the functionality of MATLAB accessible from the compiled executable. Many MATLAB codes can be converted with a minimal set of changes to source code. An introduction to the process of creating a standalone executable version of a MATLAB code is provided in this tutorial.