Effacer les filtres
Effacer les filtres

Figure count

125 vues (au cours des 30 derniers jours)
Paul Kelly
Paul Kelly le 21 Déc 2011
Modifié(e) : Steven Lord le 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 commentaire
Mary
Mary le 10 Mar 2023
Modifié(e) : Steven Lord le 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.

Connectez-vous pour commenter.

Réponse acceptée

Sean de Wolski
Sean de Wolski le 21 Déc 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 commentaires
Chuck Hayden
Chuck Hayden le 16 Mar 2022
thanks !
the cyclist
the cyclist le 3 Mai 2022
This was handy for me, too, 11 years after it was answered. :-)

Connectez-vous pour commenter.

Plus de réponses (0)

Catégories

En savoir plus sur Interactive Control and Callbacks dans Help Center et File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by