Réponse acceptée

Star Strider
Star Strider le 18 Déc 2018

1 vote

Try this:
figure
plot(randn(1, 10))
hf = gcf;
pause(5)
close(hf)

4 commentaires

madhan ravi
madhan ravi le 18 Déc 2018
+1 nice and easy
Star Strider
Star Strider le 18 Déc 2018
Thank you!
As long as pause is on!
Possibly safer:
hf = figure;
plot(randn(1, 10));
t = timer('StartDelay', 5, 'TimerFcn', @(~, ~) close(hf));
start(t);
Star Strider
Star Strider le 18 Déc 2018
Good point!

Connectez-vous pour commenter.

Plus de réponses (0)

Catégories

En savoir plus sur 2-D and 3-D Plots dans Centre d'aide et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by