GUI push button problem

1 回表示 (過去 30 日間)
aya
aya 2014 年 7 月 16 日
コメント済み: aya 2014 年 7 月 18 日
I have a project with GUI that contains two puss buttons the first called run when press on it it starts a simulation program that contains plotting of a figure I hide this figure because I want the second button to review the hidden figure by pressing it the second button called display network the problem is that when I press display network the action do not performed until the simulation program finishes How I make it possible to perform the action of second button while the action of the first button is still working
  2 件のコメント
Geoff Hayes
Geoff Hayes 2014 年 7 月 16 日
Why is it important to hide the plotting of a figure if you are just going to reveal the results with the press of the second button?
aya
aya 2014 年 7 月 17 日
I am making a Wireless Sensor Network simulation in matlab that shows several results with different figures I want the user to be able to chose which result to see

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

採用された回答

Alfonso Nieto-Castanon
Alfonso Nieto-Castanon 2014 年 7 月 17 日
You simply need to add the line:
drawnow;
to the code running the simulation steps so that Matlab flushes the event queue (and "reads-in" any potential buttonpress).
  8 件のコメント
Image Analyst
Image Analyst 2014 年 7 月 18 日
If you're using Windows, there are certain folders where it does not allow you to save anything, like under Program Files, etc. Make sure you're saving to a folder where you can save things. Can you, for example, paste a file in there with Windows Explorer without it asking you "if you're sure"?
aya
aya 2014 年 7 月 18 日
yes I am using windows but I don't specify any folder to save the figure in it I think the default is the MATLAB file that is created when first installing matlab

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

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeDesktop についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by