1
我有一個代碼做一些計算,然後調用GUI。在GUI中,我有一些供用戶選擇的選項。基於該選擇,進一步計算完成。暫停GUI程序的Matlab
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
問題是,當我編譯,它會調用圖形用戶界面和與程序向前走,我該如何使程序等到GUI中做出選擇,或者說GUI被關閉?
['waitfor'](http://www.mathworks.com/help/matlab/ref/waitfor.html)阻止執行,直到對象被刪除/關閉 – excaza