Close all figures in MATLAB, except specific ones. -
i trying determine if there nice way, close figures in matlab, except one(s) determine before hand, not closed. there such way this?
i finding wasting lot of time chasing down specific stuff close, every time matlab script runs. thank you.
you can try this
%figures keep figs2keep = [4, 7]; % uncomment following % include windows, including hidden handles (e.g. guis) % all_figs = findall(0, 'type', 'figure'); all_figs = findobj(0, 'type', 'figure'); delete(setdiff(all_figs, figs2keep)); here's link source
Comments
Post a Comment