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

34 次查看(过去 30 天)
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
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 个评论
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.

请先登录,再进行评论。

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 C Shared Library Integration 的更多信息

产品


版本

R2023a

Community Treasure Hunt

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

Start Hunting!

Translated by