closing a specified figure (if exist)

12 ビュー (過去 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'))
  1 件のコメント
mohammad
mohammad 2011 年 9 月 6 日
thanks a lot

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


Zoltan Gal
Zoltan Gal 2019 年 4 月 13 日
If the index of figure is 5, then
close(findobj('type','figure','number',5))

カテゴリ

Help Center および File ExchangeCreating, 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