Graphical user interfaces (GUIs), also known as apps, provide point-and-click control of your software applications, eliminating the need for others to learn a language or type commands in order to run the application. You can share apps both for use within MATLAB and also as standalone desktop or web apps.
You can choose from the following three ways to create an app in MATLAB:
Use the Live Editor to convert a script into a simple app that has interactive controls allowing others to experiment with variables in your code. Add sliders, dropdowns, edit fields, and buttons without writing any code. Specify what parts of the script will run when a value is changed. Hide the code to create simple apps and dashboards.
Live script with interactive controls.
You can share your live script with others to use in MATLAB or MATLAB Online.
Interactive controls are good for creating an easy interface to a live script. If you want to design a more sophisticated user interface or want more control over the app’s behavior, you should consider building a standalone app using App Designer.
App Designer is an interactive environment that integrates the two primary tasks of app building: laying out the visual components and programming the app’s behavior. It allows you to quickly move between visual design in the canvas and developing code in the MATLAB editor.
The App Designer interface.
You can share your app with others to use in MATLAB on the desktop or in a web browser using MATLAB Online. App Designer apps can also be packaged for installation into the MATLAB Apps tab. To share with non-MATLAB users, you can compile apps into standalone desktop and web apps using MATLAB Compiler.
App Designer is good for interactively designing your layout and programming its behavior in one environment. If you prefer, you can program the entire app yourself, including the user interface.
For added control over design and development, you can also use MATLAB functions to define the layout and behavior of your app. In this approach, you create a figure to serve as the container for your user interface and add components to it programmatically.
A custom app with a GUI in MATLAB.
You can share your app with others to use in MATLAB on the desktop or in a web browser using MATLAB Online. Apps can also be packaged for installation into the MATLAB Apps tab. To share with non-MATLAB users, you can compile your apps into standalone desktop apps using MATLAB Compiler.