Showing text output in GUI instead of in the Command Window

1 回表示 (過去 30 日間)
Fernando
Fernando 2012 年 12 月 19 日
Hi,
I'm working with a GUI that I'll compile to be a stand along Windows executable to be shared with people that don't have MATLAB. The GUI consists on three buttons that when pushed call three different functions. Right now the GUI works and the output of each function is shown in the Command Window in MATLAB. I want the output to be shown within the GUI so that when using the executable, the output is shown after pressing each button.
The first button takes a string cell array of dimensions 10x1 and sorts according to a random number. What I want is to show the sorted cell array withing the GUI. How can I do this? I have tried to generate a table, but I don't know how to "connect" the table with the output of the function.
The other two buttons call functions whose only output is to display some text that depends on a random number. For example, when pushing the button a random number is generated and if the number is negative, the function displays 'Hello World', while if the number is zero or positive it displays 'Goodbye World'. I want this output to also be displayed in the GUI.
Thanks,

回答 (1 件)

Image Analyst
Image Analyst 2012 年 12 月 19 日
Learn to use GUIDE. Watch some of Doug Hull's videos: http://blogs.mathworks.com/videos/ Basically you have to set a property for some type of control on your GUI, like a static text label, a table, or whatever.

カテゴリ

Help Center および File ExchangeInteractive Control and Callbacks についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by