Azzera filtri
Azzera filtri

Figure count

126 visualizzazioni (ultimi 30 giorni)
Paul Kelly
Paul Kelly il 21 Dic 2011
Modificato: Steven Lord il 10 Mar 2023
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 Commento
Mary
Mary il 10 Mar 2023
Modificato: Steven Lord il 10 Mar 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.

Accedi per commentare.

Risposta accettata

Sean de Wolski
Sean de Wolski il 21 Dic 2011
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 Commenti
Chuck Hayden
Chuck Hayden il 16 Mar 2022
thanks !
the cyclist
the cyclist il 3 Mag 2022
This was handy for me, too, 11 years after it was answered. :-)

Accedi per commentare.

Più risposte (0)

Categorie

Scopri di più su Interactive Control and Callbacks in Help Center e File Exchange

Tag

Community Treasure Hunt

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

Start Hunting!

Translated by