Standalone Applications
R2026bYou 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 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 Standalone Application Compiler
app.
Apps
| Standalone Application Compiler | Package MATLAB programs for deployment as standalone applications (Since R2025a) |
Functions
Topics
Create Standalone Applications
- Create Standalone Application from MATLAB
Try an example on creating, installing, and running a standalone MATLAB application. - Create Standalone Application Using Standalone Application Compiler App
Create a standalone application using the Standalone Application Compiler app. - Install Deployed Application
Deploy and install a generated application.
Customize Applications
- 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 Additional 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 thegetSecretfunction. (Since R2024a)
Package to Docker
- Package MATLAB Standalone Applications into Docker Images
Package a MATLAB standalone application into a Docker® image. - Create Docker Image Using Custom Base Layer
Create a Docker image with a custom base image. - Access Files with Containers
Access and manage data files within MATLAB Runtime containers using internal storage and mounted host volumes.
Best Practices
- Write Deployable MATLAB Code
Write flexible MATLAB code that can be packaged and deployed. - Standalone Applications and Arguments
Pass arguments at the command line and handle them in your MATLAB code. - 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
Theloadlibraryfunction 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) - Read and Write Confidential Data in Standalone Application
Perform read and write operations on encrypted files using theencryptingURLfunction. (Since R2026b)
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.
Troubleshooting
- Deployment Considerations
Identify and resolve compatibility issues before packaging MATLAB code for deployment. - Limitations for MATLAB Compiler and MATLAB Compiler SDK
Deployment limitations and constraints for MATLAB Compiler. - Functions Not Supported for Compilation by MATLAB Compiler and MATLAB Compiler SDK
Partial list of MATLAB functions and programs not supported in deployed applications compiled with MATLAB Compiler or MATLAB Compiler SDK™. - Ensure Multiplatform Portability for Compiled Applications
Ensure platform independence in your compiled MATLAB code. - Troubleshoot Deployed Application Failures
Troubleshoot application failure before and during end-user deployment.