How does a MATLAB compiled script represent the command window?
2 ビュー (過去 30 日間)
古いコメントを表示
I am writing a program that is just a main script, no GUI (MLAP) or multiple scripts etc. I want to use MATLAB compiler to create the installation executable for the program. However, I do not know how the program will operate once compiled (if anything will work differently/change). The process for me to get my hands on the compiler is long and I have to wait a while every time I want to make a change, so I would like to know how it works beforehand.
In particular I am concerned about the functions: uigetfile, listdlg, uiputfile, questdlg, and fopen. In MATLAB right now, the program displays information the user needs to see to the command window using fprintf. Will this be viewable once compiled? As in, will it maybe run in a terminal and display the info. Also, will it close the terminal as soon as the program finishes so the user cannot read what was displayed? Is there any guides on the compiler?
0 件のコメント
回答 (1 件)
Image Analyst
2024 年 6 月 26 日
If you compile the program then anything that would be shown in the command window in the MATLAB development environment will be shown in the console window that opens up alongside your GUI. If you used the -e option then there will be no console window and you won't see anything.
I recommend that if you want to make sure the user sees some information before being presented with some kind of popup dialog box, that you throw up another dialog box before that, like
message = sprintf('Glad you are using my program.\nSelect a folder after you click OK');
uiwait(helpdlg(message));
[baseFileName, folder] = uigetdir(pwd);
See the FAQ for reasons why your compiled app might not run the same as it does in the development environment:
The most common cause is not using fullfile to specify the full path name (folder + base file name + extension).
0 件のコメント
参考
カテゴリ
Help Center および File Exchange で Migrate GUIDE Apps についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!