Clear Filters
Clear Filters

uicontrol to start over a loop

4 views (last 30 days)
feynman feynman
feynman feynman on 1 Mar 2024
Commented: Voss on 9 Mar 2024
uiwait/uiresume through uicontrol can be used to pause/continue a loop. Is there a corresponding ui+... to start over a loop from scratch that already finished running?

Accepted Answer

Jon
Jon on 1 Mar 2024
Edited: Jon on 1 Mar 2024
Not sure from your description exactly what you are trying to accomplish, but lets say you want to run the loop whenever the user pushes a button on the UI. Then just have the callback function for the button press initialize and run the loop.
  4 Comments
feynman feynman
feynman feynman on 9 Mar 2024
Edited: feynman feynman on 9 Mar 2024
Thank you very much for your help. Now I learnt how to add such a button in an app. I would like to add such a button to a figure rather than in an app, then what can we do?
Voss
Voss on 9 Mar 2024
You can use GUIDE, or you can create the button programmatically using the uicontrol function or the uibutton function if your figure is a uifigure.

Sign in to comment.

More Answers (0)

Categories

Find more on Migrate GUIDE Apps in Help Center and File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!