Standalone Applications
You can deploy MATLAB code as a standalone application using MATLAB Compiler™ and share it royalty-free with other users. A standalone application can be an app designed using MATLAB App Designer or GUIDE, or it can be a command-line executable. The target system running a standalone application requires a MATLAB Runtime installation to run the application. It does not require a licensed copy of MATLAB. For details, see Download and Install MATLAB Runtime.
To create standalone applications from Simulink® simulations, use Simulink Compiler.
Standalone applications can be created using the compiler.build.standaloneApplication
function, or the
mcc
command, or the
Application Compiler
app.
Apps
Application Compiler | Package MATLAB programs for deployment as standalone applications |
Functions
Topics
Create Standalone Applications
- Create Standalone Application from MATLAB Function
This example shows how to package a MATLAB function into a standalone application using thecompiler.build.standaloneApplication
function. - Create Standalone Application from MATLAB Function Using Application Compiler App
Try an example on creating a standalone application using the Application Compiler app. - Install Deployed Application
Deploy and install a generated application.
Customize Applications
- Customize an Application
How to customize the look and feel of the installer generated by the compiler app. - Manage Support Packages
Including support packages when packaging MATLAB applications. - Deploy Applications and MATLAB Runtime on Network Drives
Run MATLAB Compiler generated applications from a network drive. - Include and Access Files in Packaged Applications
Include and access additional files in packaged applications. - Access Sensitive Information in Standalone Application
Retrieve sensitive information in a deployed application using thegetSecret
function. (Since R2024a)
Package to Docker
- Package MATLAB Standalone Applications into Docker Images
Package a MATLAB standalone application into a Docker® image.
Packaging
- mcc Command Arguments Listed Alphabetically
Quick reference table of MATLAB Compiler options, listed alphabetically. - mcc Command Line Arguments Grouped by Task
Quick reference table of MATLAB Compiler options, grouped by functionality.
Parallel Computing
- Deploy Parallel-Enabled MATLAB Function as Standalone Application
This example shows how to deploy a parallel-enabled MATLAB function as a standalone application using a cluster profile. - Use Parallel Computing Toolbox in Deployed Applications
Pass a cluster profile to an application that uses the Parallel Computing Toolbox™.
Dependency Analysis
- Dependency Analysis Using MATLAB Compiler
MATLAB Compiler uses a dependency analysis function to find and include files. - Dependency Analysis Function and User Interaction with the Compilation Path
MATLAB Compiler uses the MATLAB search path to analyze dependencies.
Best Practices
- Write Deployable MATLAB Code
Write flexible MATLAB code that can be packaged and deployed. - Standalone Applications and Arguments
Create standalone applications that use arguments. - Include and Access Files in Packaged Applications
Include and access additional files in packaged applications. - Protect Code and Data in Deployable Archive
Protect deployed code, data, and configuration using one or more security packaging options. - Calling Shared Libraries in Deployed Applications
Theloadlibrary
function in MATLAB allows you to load shared library into MATLAB. - Handle Sensitive Information in Deployed Applications
Use secrets to remove sensitive information from deployed code. (Since R2024a)
Troubleshooting
- Functions Not Supported for Compilation by MATLAB Compiler and MATLAB Compiler SDK
Refer to functions not able to be compiled with MATLAB Compiler or MATLAB Compiler SDK™. - Limitations
MATLAB Compiler has limitations regarding what can be compiled. - Testing Failures
If you encounter errors testing your application, ensure MATLAB Runtime is installed correctly. - Investigate Deployed Application Failures
Diagnose application failure during end-user deployment.