Pausing the program for GUI
4 ビュー (過去 30 日間)
古いコメントを表示
i have a code which does some calculation, then calls the GUI. In the GUI i have some options for user to select from. based on that answer, further calculation is done.
Function this = random(this)
...some calc
...some calc
...some calc
...some calc
GUI % calls the GUI
value = getappdata(0,'value') %gets the value from the GUI
...some calc
...some calc
end
the problem is when I compile, it calls the GUI and continues with the program. how do i make the program wait until a button is pressed in the GUI?
0 件のコメント
採用された回答
Azzi Abdelmalek
2016 年 7 月 19 日
Use waitfor function
6 件のコメント
Adam
2016 年 7 月 19 日
But when you actually initialise the GUI, you can call it as e.g.
hGUI = MyGui;
to get the handle of the GUI, then use this with waitfor.
その他の回答 (0 件)
参考
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!