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

조회 수: 25 (최근 30일)
Nico
Nico 2024년 3월 7일
댓글: Nico 2024년 3월 15일
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.
Nico
Nico 2024년 3월 15일
Thank you

댓글을 달려면 로그인하십시오.

추가 답변 (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