フィルターのクリア

How to include Simulink directories within a compiled app using App Designer?

10 ビュー (過去 30 日間)
Liam Vanderschaaf
Liam Vanderschaaf 2022 年 1 月 11 日
編集済み: Stefanie Schwarz 2024 年 4 月 17 日
I am working on compiling an app that runs a simulink model on a target computer. The app runs fine from within app designer. However, we would like to compile the app into a standalone application that can be run by simply clicking an icon on the desktop.
I have been running across the error shown in the below picture and am unsure how to solve the problem.
The MATLAB Path must have these directories for Simulink to function:
toolbox/simulink/blocks, toolbox/simulink/simulink
MATLAB cannot continue. Please restore the path and restart Matlab.
Error in => <...>.mlapp at line x
I tried using the "addpath" command. However, modifying the search path is apparently not supported by Matlab Compiler.
I also tried adding the relevant folders shown in the error message to the application by including them in the "Files required for your application to run". The "toolbox/simulink/simulink" folder could not be read for some reason and the inclusion of the "toolbox/simulink/blocks" had no affect on the resulting error message.
Finally I tried including dir("C:\...\toolbox\simulink\...") within the app code's set up function (line 639 of the app's code executes the set up function and the set up function attempts to access the simulink model). This also had no effect.
Any suggestions? Thank you for your time

回答 (1 件)

Stefanie Schwarz
Stefanie Schwarz 2024 年 4 月 17 日
編集済み: Stefanie Schwarz 2024 年 4 月 17 日
Note that deploying Simulink models or functionality to a standalone executable requires the Simulink Compiler product: https://www.mathworks.com/products/simulink-compiler.html
Please contact MathWorks Technical Support in case you encounter the error message mentioned above: https://www.mathworks.com/support/contact_us.html

カテゴリ

Help Center および File ExchangeDevelop Apps Using App Designer についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by