Wait for function that produces output - GUIDE

1 回表示 (過去 30 日間)
Marius Grigore
Marius Grigore 2017 年 8 月 11 日
コメント済み: Adam 2017 年 8 月 22 日
Hi, everyone! I need to make GUI wait for a function execution that produces output. I tried waitfor... In waitfor's help does not write how to do something like this.
waitfor(var = function(x, y));
But it won't let me do the assignation. I also tried with uiwait/uiresume but it gives me the same errors... If anyone knows how to do it please give a response. Thank you in advance!
  2 件のコメント
Geoff Hayes
Geoff Hayes 2017 年 8 月 22 日
Marius - you may need to provide more details as I would think just calling the function would "block" any GUI processing until the function as returned. i.e.
var = function(x,y);
should be sufficient without an explicit wait. Or are you calling this function in one action and expecting other actions to be "on hold". Please describe.
Adam
Adam 2017 年 8 月 22 日
What do you mean by 'make the GUI wait'? A GUI doesn't do anything by itself. Do you mean you want to block user-interactions or that you have some other function that relies on the output of this one? In the latter case what Geoff Hayes says applies - functions happen in order anyway unless you are triggering callbacks or other things that are setting up race conditions in your code.

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

回答 (0 件)

カテゴリ

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

タグ

製品

Community Treasure Hunt

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

Start Hunting!

Translated by