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 Exchange에서 Creating, 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