Clear All But
Version 1.0.0.0 (1.59 KB) by
Roland Pfister
Clear the workspace while keeping some of your variables.
Clear All But is an alternative version of David Yang's KEEP that I didn't know when doing this one.
The workspace is cleared as if the 'clear all' command was used but it is possible to keep some of your most beloved variables.
Cite As
Roland Pfister (2025). Clear All But (https://www.mathworks.com/matlabcentral/fileexchange/25339-clear-all-but), MATLAB Central File Exchange. Retrieved .
MATLAB Release Compatibility
Created with
R2009a
Compatible with any release
Platform Compatibility
Windows macOS LinuxCategories
- MATLAB > Programming > Functions > Variables >
Find more on Variables in Help Center and MATLAB Answers
Tags
Acknowledgements
Inspired by: keep
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!Discover Live Editor
Create scripts with code, output, and formatted text in a single executable document.
Version | Published | Release Notes | |
---|---|---|---|
1.0.0.0 |