Clear Filters
Clear Filters

Opening Simulink models in stand-alone executable app?

42 views (last 30 days)
Hello,
I have an interactive app (.mlapp created in AppDesigner) that makes changes to a Simulink model (.slx) selected by the user. For example, the user may select signal lines and rename them according to a standard naming convention. After completion, the user saves and closes the Simulink model and moves on to the next one, etc. The .m scripts in the app utilize functions from several toolboxes such as Statistics, Simulink Test, Stateflow, Simscape, etc.
I'm interested in converting this app into a stand-alone executable (and perhaps even a web-app). The intent is to provide this executable to suppliers who may not have access to the Mathworks suite. What limitations/restrictions would come into play for such a conversion?
  • Can the user be provided a file-browser to select the Simulink model to open? Does the Simulink model itself need to be compiled?
  • Can the executable open the selected model and allow the user to interact (select, move, rename, etc)?
  • Are the necessary toolbox functions automatically included in the executable? Or does the end-user need a local installation of these toolboxes?
In general, I have the impression that stand-alone executables are suitable for apps that are self-contained (e.g., data-processing, plotting, etc) rather than opening and working with other files such as Simulink models.
Just beginning to look into this, so any learned guidance is much appreciated. Thanks!
P

Answers (1)

Aditya Saikumar
Aditya Saikumar on 23 Aug 2024 at 9:00
Hi Prabhakar,
“App Designer uses MATLAB Compiler to create standalone applications. The following MATLAB documentation links list which Products/Toolboxes MATLAB Compiler supports, and which functions it does not support:
End-users do not need to install any toolboxes to run an application created by MATLAB Compiler. Take a look at the following MATLAB Answers link which provides more details about how MATLAB Compiler works in case additional Toolboxes are used: https://www.mathworks.com/matlabcentral/answers/1653310-which-toolboxes-are-included-in-the-matlab-runtime-mcr-for-2021a#answer_899665
"uigetfile" can be used to launch a file browser to select files. Following is the MATLAB documentation link for "uigetfile": https://www.mathworks.com/help/releases/R2024a/matlab/ref/uigetfile.html
As far as I know, the only way to edit Simulink models through App Designer is to use “open_system” function which opens the given Simulink model in Simulink. However, this function is not supported by MATLAB Compiler as listed in the documentation link above.
Thank you,
Aditya

Categories

Find more on Modeling in Help Center and File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!