Wait for function that produces output - GUIDE

1 vue (au cours des 30 derniers jours)
Marius Grigore
Marius Grigore le 11 Août 2017
Commenté : Adam le 22 Août 2017
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 commentaires
Geoff Hayes
Geoff Hayes le 22 Août 2017
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 le 22 Août 2017
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.

Connectez-vous pour commenter.

Réponses (0)

Catégories

En savoir plus sur MATLAB dans Help Center et File Exchange

Produits

Community Treasure Hunt

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

Start Hunting!

Translated by