In this tutorial, we will learn how to download and install MATLAB runtime package. MATLAB runtime allows to run compiled MATLAB applications or components without having MATLAB installed on a target machine.
Usage of MATLAB runtime
MATLAB runtime enables you to create and distribute applications, simulations, or software components created using MATLAB/Simulink. It allows to run compiled MATLAB/Simulink applications to run without having MATLAB installed on a target machine.
Approach 1: Using command window in MATLAB
Run the following command inside the MATLAB command window to start the download. Once, the download completes the matlab will provide the relevant (.zip).
Note
Depending on the MATLAB runtime version the download size may vary from 1 – 5 GB and can take significant download time.
Approach 2: Using MATLAB runtime webpage
The MATLAB runtime package can be download from the official MATLAB website using the following link:
MATLAB Runtime – MATLAB Compiler – MATLAB (mathworks.com)
The web page offers multiple versions for MATLAB Runtime and the user can download the relevant package as per their requirements.
Once the download completes you can unzip the MATLAB runtime package(.zip) and proceed to installation.
Note
The MATLAB runtime is version specific.
Installing MATLAB runtime
Windows
[1] Unzip the MATLAB Runtime installer (.zip) package.
For example:
Right-click the zip file MATLAB_Runtime_R2022a_win64.zip
and select extract all.
[2] Double-click the file setup.exe
from the extracted files to start the installer.
[3] Default installation folder: C:\Program Files\MATLAB\MATLAB Runtime\R2022a
Linux
[1] Unzip the MATLAB Runtime installer (.zip) at the terminal using the unzip
command.
For example:
If you are unzipping the R2022a MATLAB Runtime installer then at the terminal type:
unzip MATLAB_Runtime_R2022a_glnxa64.zip
[2] At the terminal type:
sudo -H ./install
Note
You may need to allow the root user to access the running X server:
xhost +SI:localuser:root
sudo -H ./install
xhost -SI:localuser:root
[3] Default installation folder: /usr/local/MATLAB/MATLAB_Runtime/R2022a
Mac
[1] Unzip the MATLAB Runtime installer (.zip) at the terminal using the unzip
command.
For example:
If you are unzipping the R2022a MATLAB Runtime installer then at the terminal type:
unzip MATLAB_Runtime_R2022a_maci64.zip
[2] At the terminal type:
sudo -H ./install
[3] Default installation folder: /Applications/MATLAB/MATLAB_Runtime/R2022a
Note
On Linux or MAC platform you have to setup the path environment variables MATLAB runtime to work properly. For instructions on setting the path environment variables, see official guide on how to Set MATLAB Runtime Path for Deployment.
Checking MATLAB runtime version
Use mcrversion in command window to return the return MATLAB Runtime version number that matches MATLAB version.
Use mcrinstaller in command window to return version and location information for MATLAB Runtime installer corresponding to your current platform.
Note
If MATLAB runtime is not already installed on your system it displays you the option to download it via MATLAB command window: