how do i close plotted graph?
3 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Kritank Kalyan
le 18 Déc 2018
Commenté : Star Strider
le 18 Déc 2018
I am trying to close a graph automatically after 5 second of view
0 commentaires
Réponse acceptée
Star Strider
le 18 Déc 2018
Try this:
figure
plot(randn(1, 10))
hf = gcf;
pause(5)
close(hf)
4 commentaires
Guillaume
le 18 Déc 2018
As long as pause is on!
Possibly safer:
hf = figure;
plot(randn(1, 10));
t = timer('StartDelay', 5, 'TimerFcn', @(~, ~) close(hf));
start(t);
Plus de réponses (0)
Voir également
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!