"run()" command in compiled .m-Script does not work

Hello,
I created an .m-script with the following line of code:
run('G:\temppath\tempapp.mlapp');
When I prompt this command in the command window the app starts well.
Now I created an ".exe-file" of the m.-script with "MATLAB Compiler". The Problem is, when I start the app I get the following error-message:
"RUN cannot execute the file 'G:\temppath\tempapp.mlapp'. RUN requires a valid MATLAB script"
Can anyone tell me where the problem could be?
Thanks and regards
Nico

 採用された回答

Kojiro Saito
Kojiro Saito 2024 年 3 月 7 日

0 投票

run command is not supported by MATLAB Compiler as written in the following document.
You can call tempapp.mlapp by
tempapp
if you include tempapp.mlapp in your standalone application.

3 件のコメント

Nico
Nico 2024 年 3 月 8 日
Okay thank you. Is there another way of how to create a standalone-app but not including the .mlapp-files? My goal is not to allways install a new app, but only change the mlapp file. So I want to be able to change them after the app was compiled.
Kojiro Saito
Kojiro Saito 2024 年 3 月 14 日
Standalone app cannot call MATLAB artifacts (.m, .mlx, .mlapp etc.) without compiling. You need to call MATLAB to open tempapp.mlapp (!MATLAB.exe -r "tempapp") from compiled exe.
Nico
Nico 2024 年 3 月 15 日
Thank you

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

その他の回答 (0 件)

カテゴリ

ヘルプ センター および File ExchangeMATLAB Compiler SDK についてさらに検索

製品

リリース

R2023a

質問済み:

2024 年 3 月 7 日

コメント済み:

2024 年 3 月 15 日

Community Treasure Hunt

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

Start Hunting!

Translated by