Is there a way of counting the number of figure windows currently open? I am trying to clear a set of figure windows without closing them.

1 Kommentar

Mary
Mary am 10 Mär. 2023
Bearbeitet: Steven Lord am 10 Mär. 2023
Yes, you can use the 'numel' and 'findall' functions in MATLAB [SL: removed URL unrelated to question] to count the number of open figure windows.

Melden Sie sich an, um zu kommentieren.

 Akzeptierte Antwort

Sean de Wolski
Sean de Wolski am 21 Dez. 2011

18 Stimmen

h = findobj('type','figure');
n = length(h);
And you can set the properties of all three at once using their handles - stored in h.

3 Kommentare

Paul Kelly
Paul Kelly am 21 Dez. 2011
Thanks :)
Chuck Hayden
Chuck Hayden am 16 Mär. 2022
thanks !
the cyclist
the cyclist am 3 Mai 2022
This was handy for me, too, 11 years after it was answered. :-)

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (0)

Kategorien

Mehr zu Creating, Deleting, and Querying Graphics Objects finden Sie in Hilfe-Center und File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by