MATLAB Answers

0

Can you pause a figure without pausing the code execution?

Asked by Tyler Murray on 5 Dec 2016
Latest activity Answered by Walter Roberson
on 5 Dec 2016
I am using the following code to display an image.
splash = imshow('splash.png');
pause(5)
delete(splash)
After 5 seconds I want the figure to delete. Using pause though holds the execution of the matlab script for x amount of seconds. Is there a command/way you can hold the figure, in my case, for 5 seconds while having the script run in the background uninterrupted?

  0 Comments

Sign in to comment.

1 Answer

Answer by Walter Roberson
on 5 Dec 2016
 Accepted Answer

You can use timer() with a one-shot event to delete the figure.

  0 Comments

Sign in to comment.