Main Content

About MATLAB Runtime

MATLAB® Runtime is a freely available set of shared libraries, MATLAB code, and other files that you can use to execute MATLAB code on computers without an installed version of MATLAB. MATLAB Runtime enables you to distribute MATLAB applications to users without requiring them to purchase MATLAB licenses, which reduces deployment costs.

After you install MATLAB Runtime, you might need to add its directories to the system library path, depending on your operating system and shell environment. This step is required on Linux®. For details, see Set MATLAB Runtime Library Paths for Deployment.

Differences Between MATLAB Runtime and MATLAB

The table below compares key features of MATLAB Runtime with those of MATLAB.

FeatureMATLAB RuntimeMATLAB
LicensingFreely available to downloadRequires an active license
File accessEncrypted and immutableAllows full access to modify MATLAB files
User interfaceNo desktop graphical interfaceIncludes desktop graphical interface
Version requirementsVersion-specific; must match the compiler versionRuns code from different versions
Path configurationFixed paths that cannot be changedAllows paths to be modified during execution

Compatibility with MATLAB Compiler and MATLAB Compiler SDK Artifacts

MATLAB Runtime receives updates with each MATLAB release. Applications that use artifacts built with MATLAB Compiler™ or MATLAB Compiler SDK™ require a matching version of MATLAB Runtime at the same update level or newer to run. To distribute these applications, ensure the matching version of MATLAB Runtime is available to the end user.

To run these applications, you must use a version of MATLAB Runtime that matches or is later than the update level of the MATLAB release used to create the artifacts. For example, if you create an artifact using MATLAB R2023a Update 2, use the MATLAB Runtime version that corresponds to R2023a Update 2 or later. You can use the mcrversion command to return the version number of MATLAB Runtime that matches the version of MATLAB you use to execute the command.

To create a custom installer using compiler.package.installer or compiler.runtime.customInstaller, you must download the full MATLAB Runtime installer at the same version and update level as the version of MATLAB used to create the installer. Then, specify the installer location in MATLAB Settings under MATLAB Compiler. You can use the compiler.runtime.download command to get the MATLAB Runtime installer that matches the release and update level of your MATLAB installation.

Ways to Obtain MATLAB Runtime

You can obtain MATLAB Runtime in several ways.

  • Download the MATLAB Runtime installer at the latest update level for the selected release from the website at https://www.mathworks.com/products/compiler/matlab-runtime.html. This option is best for users who want to run deployed applications. For details, see Download and Install MATLAB Runtime.

  • Use compiler.runtime.download to download the MATLAB Runtime installer that matches the version and update level of MATLAB used to execute the command. This option is best for developers who want to create application installers that contain MATLAB Runtime.

  • Use compiler.package.installer to create an application installer that can optionally include MATLAB Runtime. This option is best for developers who want to distribute an application along with MATLAB Runtime.

  • Use compiler.runtime.customInstaller (since R2024b) to create an installer that contains only the MATLAB Runtime components required to run specific applications. This option is best for developers who require an installation with a minimal size footprint.

  • Download a Docker® image that contains MATLAB Runtime. For details, see MATLAB Runtime Containers.

Size and Performance Considerations for MATLAB Runtime

The system requirements for MATLAB Runtime are the same as those for an installation of MATLAB. Once installed, MATLAB Runtime operates completely offline.

Because MATLAB Runtime supports the full MATLAB programming language, the runtime libraries are large. However, you can reduce the MATLAB Runtime installation size. For instance, you can omit GPU libraries. For more details, see Reduce MATLAB Runtime Size.

Starting a compiled application takes approximately the same amount of time as starting MATLAB. Since calls into MATLAB Runtime are serialized, the calls are thread-safe, which can impact performance.

See Also

| | |

Topics