Is there a way to close all open MATLAB figures at once?

120 visualizzazioni (ultimi 30 giorni)

Risposta accettata

MathWorks Support Team
MathWorks Support Team il 29 Ago 2024
Modificato: MathWorks Support Team il 29 Ago 2024
To close all open figures, use the command
close all
Figures with the 'HandleVisibility' property set to 'off' will not be closed with "close all". To close these figures, use the command
delete(findall(0));
If you have a GUI that opens plot windows and you would like to close all plots without closing the GUI at the same time, then you can use the following code:
% Delete all Figures with an empty FileName property
delete(findall(groot, 'Type', 'figure', 'FileName', []));

Più risposte (1)

Chase
Chase il 3 Lug 2014
Modificato: MathWorks Support Team il 6 Apr 2018

Categorie

Scopri di più su Simulink in Help Center e File Exchange

Tag

Non è stata ancora inserito alcun tag.

Prodotti

Community Treasure Hunt

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

Start Hunting!

Translated by