closing a specified figure (if exist)
Show older comments
does anyone know how to close a specified figure if it exists currently? for example: h=figure
if h exists close(h) end
Accepted Answer
More Answers (2)
Zoltan Gal
on 13 Apr 2019
0 votes
If the index of figure is 5, then
close(findobj('type','figure','number',5))
Categories
Find more on Creating, Deleting, and Querying Graphics Objects in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!