Close a figure when a button is pressed or when a certain elapses

28 views (last 30 days)
Hello I'd like to know if there is a way to erase a figure when either a button is pressed or a specific period of time elapses.

Accepted Answer

Rik
Rik on 31 Jan 2020
You can set 'close(gcbf)' as the callback of your button, and you could use a timer object to trigger a close as well.

More Answers (0)

Categories

Find more on Interactive Control and Callbacks in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!