how do i close plotted graph?

 Risposta accettata

Star Strider
Star Strider il 18 Dic 2018
Try this:
figure
plot(randn(1, 10))
hf = gcf;
pause(5)
close(hf)

4 Commenti

madhan ravi
madhan ravi il 18 Dic 2018
+1 nice and easy
Star Strider
Star Strider il 18 Dic 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 il 18 Dic 2018
Good point!

Accedi per commentare.

Più risposte (0)

Categorie

Scopri di più su Mathematics in Centro assistenza e File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by