closing a specified figure (if exist)

조회 수: 18 (최근 30일)
mohammad
mohammad 2011년 9월 6일
답변: Zoltan Gal 2019년 4월 13일
does anyone know how to close a specified figure if it exists currently? for example: h=figure
if h exists close(h) end

채택된 답변

Grzegorz Knor
Grzegorz Knor 2011년 9월 6일
h = figure;
if ishandle(h)
close(h)
end
  댓글 수: 4
Grzegorz Knor
Grzegorz Knor 2011년 9월 6일
close(findobj('type','figure','name','flashing'))
mohammad
mohammad 2011년 9월 6일
thanks a lot

댓글을 달려면 로그인하십시오.

추가 답변 (2개)

Paulo Silva
Paulo Silva 2011년 9월 6일
close(findall(0,'type','figure','name','flashing'))

Zoltan Gal
Zoltan Gal 2019년 4월 13일
If the index of figure is 5, then
close(findobj('type','figure','number',5))

카테고리

Help CenterFile Exchange에서 Creating, Deleting, and Querying Graphics Objects에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by