How can I add a button which pauses and resumes the code when pressed in the App Designer?

10 views (last 30 days)
I've got a simple code running a loop which displays the output in a value field in the app window. How do I do to add a button in the app which pauses code when pressed and when pressed again it makes it continue?
It basically has to do the same function as the Run/Pause/Continue button from matlab's toolbar.
Thanks in advance

Answers (1)

Raunak Gupta
Raunak Gupta on 18 Feb 2020
Hi,
You can add pushbutton in the App with callbacks for each of the functionality RUN/PAUSE/CONTINUE/STOP. uiwait and uiresume can help to pause and continue the function. They can be added as callback into the pushbuttons. You can refer to similar answers which shows how to implement individual callbacks.

Categories

Find more on Develop Apps Using App Designer in Help Center and File Exchange

Products


Release

R2019b

Community Treasure Hunt

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

Start Hunting!