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

397 vues (au cours des 30 derniers jours)
MathWorks Support Team
MathWorks Support Team le 27 Juin 2009
I would like to close all opened MATLAB figures at once.

Réponse acceptée

MathWorks Support Team
MathWorks Support Team le 29 Août 2024
Modifié(e) : MathWorks Support Team le 29 Août 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', []));

Plus de réponses (1)

Chase
Chase le 3 Juil 2014
Modifié(e) : MathWorks Support Team le 6 Avr 2018

Catégories

En savoir plus sur Simulink dans Help Center et File Exchange

Tags

Aucun tag saisi pour le moment.

Produits

Community Treasure Hunt

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

Start Hunting!

Translated by