How to bypass startup file in Application Builder

3 ビュー (過去 30 日間)
John F
John F 2017 年 2 月 24 日
コメント済み: John F 2017 年 2 月 28 日
I am trying to build a standalone app. I have been successful in the past doing it. However, I now have a custom startup.m file that includes calling Simulink and other commands. When I try to run the deployed apps I'm building, they all try to start Simulink, and thus they crash.
I know there must be a way to bypass these commands, but I can't seem to find it in the Documentation. Please help!

採用された回答

Faiz Gouri
Faiz Gouri 2017 年 2 月 27 日
The startup.m file is always included with the compiled application. This is to ensure that the behavior of MATLAB and the compiled application is same during the initialization phase. If you want some statements in the startup.m file to NOT execute when the compiled application is running then, wrap those statements under isdeployed .
if (~isdeployed)
% code that calls Simulink and other commands
end
For information about "isdeployed" can be found here
  1 件のコメント
John F
John F 2017 年 2 月 28 日
Woohoo! Thanks a lot!

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeMATLAB Compiler についてさらに検索

製品

Community Treasure Hunt

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

Start Hunting!

Translated by