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 CenterFile Exchange에서 MATLAB에 대해 자세히 알아보기

태그

제품

Community Treasure Hunt

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

Start Hunting!

Translated by