fig.m / closefig.m

Automates selective closing of figure windows.

You are now following this Submission

Use:

>> fig('figure name');
>> plot(x,y);
>>
>> other stuff
>>
>> closefig('figure name');

Really just a convenience, but it helps in that closefig.m only closes figures that were tagged by fig.m. This way, I can insert the fig/closefig pair in code that generates plots so that at each run the code will replace its old figures with new ones without affecting other figure windows.

Cite As

Sumedh Joshi (2026). fig.m / closefig.m (https://www.mathworks.com/matlabcentral/fileexchange/26096-fig-m-closefig-m), MATLAB Central File Exchange. Retrieved .

Categories

Find more on Interactive Control and Callbacks in Help Center and MATLAB Answers

Tags

Add Tags

General Information

MATLAB Release Compatibility

  • Compatible with any release

Platform Compatibility

  • Windows
  • macOS
  • Linux
Version Published Release Notes Action
1.0.0.0