procced the for loop until UIButton pushed

11 visualizzazioni (ultimi 30 giorni)
TheDice il 16 Apr 2021
Hi all, I want to wait in my For loop until a UI button has been pressed. Is there a function for this?
for v = 1:10
% do not proceed until the button is pressed

Risposte (1)

Aghamarsh Varanasi
Aghamarsh Varanasi il 19 Apr 2021
Modificato: Aghamarsh Varanasi il 19 Apr 2021
You can use the uiwait function to pause the execution and wait for the button click. You can refer to uiwait documentation page for more details. You also need to register the 'ButtonPush' callback for the button inorder to call the uiresume function.
Hope this helps


Scopri di più su Develop Apps Using App Designer in Help Center e File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by