フィルターのクリア

ending a GUI by exiting it, and making an exe file application from it-

1 回表示 (過去 30 日間)
alex
alex 2012 年 10 月 12 日
as in the title, I have 2 questions-
1. I've finished my GUI with an Exit pushbutton, and in the callback function I made-
function Exit_callback(~,~)
close fh;% fh=figure name
end
but it doesnt work, so how can I end my gui with an exit+close the window?
2. I've seen the posibility of making an exe file from a gui- how do I do that?,
and does it only possible for .fig files, because my GUI is just an .m file?

採用された回答

Image Analyst
Image Analyst 2012 年 10 月 12 日
編集済み: Image Analyst 2012 年 10 月 12 日
1) Use delete() instead.
% No, don't do this:
close fh;% fh=figure name
% Yes, do this:
delete(fh); % fh = figure handle, not name.
And if you're using GUIDE, use the figure "tag" not the figure "name" like you said.
delete(handles.figMainWindow); % figMainWindow is the "tag" property.
2) You need the compiler toolbox. http://www.mathworks.com/products/compiler/ It will work for a plain m-file with no GUI. You can send your results to the console window or to a disk file (e.g. Excel workbook).

その他の回答 (1 件)

Azzi Abdelmalek
Azzi Abdelmalek 2012 年 10 月 12 日
you can use deploy tool, to make an executable

カテゴリ

Help Center および File ExchangeMigrate GUIDE Apps についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by