A MATLAB® app is a self-contained MATLAB program with a user interface that automates a task or calculation. All the operations required to complete the task — getting data into the app, performing calculations on the data, and getting results are performed within the app. Apps are included in many MATLAB products. In addition, you can design your own apps using the App Designer development environment. The Apps tab on the MATLAB Toolstrip displays all currently installed apps when you click the down arrow on the far right of the toolstrip.
You cannot run MATLAB apps using the MATLAB Runtime. Apps are for MATLAB to MATLAB deployment. To run code using the MATLAB Runtime, the code must be packaged using MATLAB Compiler™.
There are three key ways to get apps:
Many MATLAB products, such as Curve Fitting Toolbox™, Signal Processing Toolbox™, and Control System Toolbox™ include apps. In the apps gallery, you can see the apps that come with your installed products.
Create Your Own
App Designer is the recommended environment for building apps in MATLAB. You can create your own MATLAB app and package it into a single file that you can distribute to others. The apps packaging tool automatically finds and includes all the files needed for your app. It also identifies any MATLAB products required to run your app.
You can share your app directly with other users, or share it with the MATLAB user community by uploading it to the MATLAB File Exchange. When others install your app, they do not need to be concerned with the MATLAB search path or other installation details.
Watch this video for an introduction to creating apps:
Packaging and Installing MATLAB Apps (2 min, 58 sec)
Apps (and other files) uploaded to the MATLAB File Exchange are available from within MATLAB:
On the Home tab, in the Environment section, click the Add-Ons arrow button.
Click Get Add-Ons.
Search for apps by name or descriptive text.
When you create an app package, MATLAB creates a single app installation file (
enables you and others to install your app easily.
In particular, when you package an app, the app packaging tool:
Performs a dependency analysis that helps you find and add the files your app requires.
Reminds you to add shared resources and helper files.
Stores information you provide about your app with the app package. This information includes a description, a list of additional MATLAB products required by your app, and a list of supported platforms.
Automates app updates (versioning).
In addition when others install your app:
It is a one-click installation.
Users do not need to manage the MATLAB search path or other installation details.
Your app appears alongside MATLAB toolbox apps in the apps gallery.
Write the app as an interactive application with a user interface written in the MATLAB language.
All interaction with the app is through the user interface.
Make the app reusable. Do not make it necessary for a user restart the app to use different data or inputs with it.
Ensure the main function returns the handle of the main figure. (The main function created by GUIDE returns the figure handle by default.)
Although not a requirement, doing so enables MATLAB to remove the app files from the search path when users exit the app.
If you want to share your app on MATLAB File Exchange, you must release it under a BSD license. In addition, there are restrictions on the use of binary files such as MEX-files, p-coded files, or DLLs.
The main file must be a function (not a script).
Because you invoke apps by clicking an icon in the apps gallery, the main function
cannot have any required input arguments. However, you can define optional input
arguments. One way to define optional input arguments is by using