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 件のコメント

Mary
Mary 2023 年 3 月 10 日
編集済み: Steven Lord 2023 年 3 月 10 日
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.

サインインしてコメントする。

 採用された回答

Sean de Wolski
Sean de Wolski 2011 年 12 月 21 日

18 投票

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 件のコメント

Paul Kelly
Paul Kelly 2011 年 12 月 21 日
Thanks :)
Chuck Hayden
Chuck Hayden 2022 年 3 月 16 日
thanks !
the cyclist
the cyclist 2022 年 5 月 3 日
This was handy for me, too, 11 years after it was answered. :-)

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

ヘルプ センター および File ExchangeCreating, Deleting, and Querying Graphics Objects についてさらに検索

タグ

質問済み:

2011 年 12 月 21 日

編集済み:

2023 年 3 月 10 日

Community Treasure Hunt

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

Start Hunting!

Translated by