How to create a command to clear all open figures without closing them?
9 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
MathWorks Support Team
am 25 Okt. 2022
Beantwortet: MathWorks Support Team
am 23 Nov. 2022
How to create a command to clear all open figures without closing them?
Akzeptierte Antwort
MathWorks Support Team
am 25 Okt. 2022
Please copy and paste the following code in the MATLAB editor and save it as "clear_all_figures.m" in your MATLAB path.You can run it by entering the file name "clear_all_figures" in the command window or in your MATLAB code.
%% find all the handles of the figures
h = findall(0,'Type','figure');
%% loop and clear all the figures
for n = 1:length(h)
clf(h(n))
end
0 Kommentare
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Graphics Objects finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!