A reader asked how to package a MATLAB GUI into an executable EXE file, so I am sharing the method. The current MATLAB GUI uses files ending with .mlapp, rather than the old .fig based format.
1. Enter deploytool in the command window and press Enter, then select the first option.
2. Select the .mlapp program you just created (Mortgage.mlapp).
3. In the upper right corner, you can change the generation path in Settings (1).
(2) You can replace the EXE icon with a thumbnail image, the default is shown below.
(3) Indicates the generated files.
4. After that, Package will turn green, click it. Wait for the packaging to complete.
5. Once completed, you can find your EXE file in the or_testing folder of the packaged directory.
Opening the EXE displays this interface.
One additional note:
The App Designer tool was introduced in MATLAB R2016a, and like GUIDE, it is also a visual integrated design environment. In addition to providing standard user interface components similar to GUIDE, it also offers components related to industrial applications, such as dashboards, knobs, switches, and indicators. Using the App Designer tool, users can develop user-friendly MATLAB application modules that can be shared.
The components that make up the App user interface are called components, which are reusable objects that can interact with other objects, encapsulating one or more functional program modules. In contrast, the components designed with GUIDE are called controls, which are a special type of component used solely for the visual presentation of data.
The essence of GUI and App is the same. Why did MathWorks develop a completely new application building platform called App Designer?
To quote Chris Portal, the development manager for MATLAB graphics and application building:
“The main difference between GUIDE and App Designer lies in the technology used. GUIDE is based on Java Swing, which Oracle no longer invests in. While this platform can achieve some short-term victories, it will not receive new extensions in the long run, nor will it allow us to provide users with web-based workflows.
App Designer is built on modern web-based technologies such as JavaScript, HTML, and CSS, providing us with a platform that can flexibly keep up with user demands and allow applications to run on the web. Users can continue to run their existing Java-based applications and choose the new platform when appropriate.”