MATLAB Answers

How would these functions behave after compiling from GUI -> Executable?

1 ビュー (過去 30 日間)
Kevin Phung
Kevin Phung 2019 年 5 月 2 日
コメント済み: Rik 2019 年 5 月 2 日
I have designed a matlab gui (not with guide or appdesigner) and am interested in eventually compiling it into an executable file so that other users won't be required to have matlab in order to run it.
However, I was wondering how some functionalities in my GUI would work.
  • I have a 'save' and 'load' feature in my gui where I save my class objects into a .mat file, and my load function will read from this .mat file. Will this still be possible?
  • in my GUI, i search for these .mat files to load through:
list = dir('*.mat')
because this command checks the current directory in MATLAB... I would imagine that this will not work once it is turned into an executable. Will I have to program my function to first check for the type of operating system, then look at a specific directory by accessing the terminal? (for example, IF mac, then 'pwd', if windows, then 'cd')
  3 件のコメント
Rik
Rik 2019 年 5 月 2 日
There is a difference between the OS command line/terminal command and the Matlab function. I would assume you don't lose access to the Matlab function dir just because you compiled your function to a MacOS executable, that simply doesn't make sense to me.
I don't own the toolboxes either, so I can't test it for you.

サインインしてコメントする。

回答 (0 件)

Community Treasure Hunt

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

Start Hunting!

Translated by