Pausing the program for GUI
1 次查看(过去 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 个)
另请参阅
类别
在 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!