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.
Pawel Mroszczyk (2021). FRESH (https://www.mathworks.com/matlabcentral/fileexchange/6089-fresh), MATLAB Central File Exchange. Retrieved .
MATLAB Release Compatibility
Platform CompatibilityWindows macOS Linux
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!Start Hunting!