Calling MATLAB scripts from a MATLAB standalone executable

조회 수: 7 (최근 30일)
ss
ss 2022년 6월 23일
댓글: dpb 2022년 6월 24일
We have designed a large MATLAB standalone executable and we want it to call external .m scripts without them being compiled while creating the executables. The reason we want to do that is to have the flexibilty to make changes in the .m script and not having to compile them everytime. Is it possible to do that?

채택된 답변

Steven Lord
Steven Lord 2022년 6월 23일
No.
From the documentation "MATLAB Runtime only works on MATLAB code that was encrypted when the deployable archive was built. Any function or process that dynamically generates new MATLAB code will not work against MATLAB Runtime."
  댓글 수: 1
dpb
dpb 2022년 6월 24일
Ah...I knew the interactive test wsn't totally conclusive -- but didn't want to take the time to actually build a compiled version. Shoulda' done, just to be certain what worked interactively would still work when compiled.
I did see a post to similar Q? that indicated one could load text and eval it...but I didn't test that, either.

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

추가 답변 (1개)

dpb
dpb 2022년 6월 23일
Not directly supported, no.
I've not tried building one that uses it, but seems like you should be able to use feval with a dynamic function handle/name that is the name of the function to execute.
  댓글 수: 1
dpb
dpb 2022년 6월 24일
What works during development testing doesn't necessarily translate to compiled version per @Steven Lord's Answer below...and the only warning given is that one doesn't normally need to use feval -- of course, the suggestion to fix hardcodes in the given function so back to same place.

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

카테고리

Help CenterFile Exchange에서 MATLAB Compiler에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by