필터 지우기
필터 지우기

How to write and access one file from another when using .exe file converted by MATLAB Compiler?

조회 수: 2 (최근 30일)
I have a .m file (which calls a GUI) that I need to convert to .exe through MATLAB Compiler( to make it standalone). However, the .m file is written in such a way that it writes some new .m files (when a button is pressed). And when another button is pressed, those written function are executed.
The problem is that the .m file is converted to .exe fine. But, the other .m files (those that are written from within the main .m file) are not written (or converted to .exe). I am not able to figure out a way to fix this.
Thanks in advance for any help.
  댓글 수: 2
dpb
dpb 2013년 7월 29일
If the app creates m-files to execute when it runs, how in the world would you expect the compiler to be able to compile them before that?
Your only choice for truly standalone would be to have a predefined set of functions to select from. If you're adamant it must be dynamic then you've a much bigger problem.

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

답변 (1개)

Walter Roberson
Walter Roberson 2013년 7월 29일
Use the ctfroot() to figure out which directory the executable has unpacked itself into. Write the new .m files into there. eval() or evalc() or feval() the new .m files.

카테고리

Help CenterFile Exchange에서 Search Path에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by