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 个评论

Thanks :)
thanks !
This was handy for me, too, 11 years after it was answered. :-)

请先登录,再进行评论。

更多回答(0 个)

类别

在 帮助中心 和 File Exchange 中查找有关 Graphics Object Properties 的更多信息

标签

Community Treasure Hunt

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

Start Hunting!

Translated by