FRESH

Keeps specified variables and figures, and clears/closes all remaining. Also clears command window.

You are now following this Submission

Inspired by the usefulness of KEEP-series utilities (original KEEP by David Yang, KEEP2 by Mark Lubinski, KEEP3 by Martin Barugel) I created a simple utility which I find useful. FRESH does what KEEP3 does with variables (keeps only the ones you specify, clears the rest), and also does this with figures. As a finishing touch, it clears the command window, giving you the "fresh start" in your MATLAB session.

Requires that you also have KEEP3.M in your search path (which you can download from this website). IMPORTANT: On my system I renamed KEEP3.M to KEEP.M, and this is what FRESH assumes. If your copy is named KEEP3.M, just run a quick search-and-replace to substitute KEEP --> KEEP3 to make FRESH work properly.

If anyone can improve this utility, please feel free to do so.

Cite As

Pawel Mroszczyk (2026). FRESH (https://in.mathworks.com/matlabcentral/fileexchange/6089-fresh), MATLAB Central File Exchange. Retrieved .

General Information

MATLAB Release Compatibility

  • Compatible with any release

Platform Compatibility

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