Compile executable with another function

조회 수: 2 (최근 30일)
Jared
Jared 2013년 3월 14일
I have a GUI executable that has a button which, when pressed, calls a function which uses textscan to import a data file (.csv).
Is it possible to call this function while it is compiling, so the data file is already "loaded" into the exe?

답변 (1개)

Image Analyst
Image Analyst 2013년 3월 14일
Yes, sort of. You don't call it while it's compiling. It compiles it without calling (executing) the function. It wouldn't make sense to call it while it's compiling, but it does get included in the compiled code. You just need to put the main m-file and it finds all the dependent m-files that it needs automatically. You just need to have the (very expensive) MATLAB Compiler Toolbox.
  댓글 수: 1
Jared
Jared 2013년 3월 14일
I have the compiler toolabox and have been developing this in GUIDE. I have all the necessary functions loaded into GUIDE as well, so when it compiles, it includes everything. However, the function is "on button press" load this file. If I get rid of the on button press part, and the function is just "load this file", it will automatically load it?

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

카테고리

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