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

384 次查看(过去 30 天)

采纳的回答

MathWorks Support Team
编辑:MathWorks Support Team 2024-8-29
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', []));

更多回答(1 个)

Chase
Chase 2014-7-3
编辑:MathWorks Support Team 2018-4-6

类别

Help CenterFile Exchange 中查找有关 Simulink 的更多信息

标签

尚未输入任何标签。

产品

Community Treasure Hunt

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

Start Hunting!

Translated by