File Exchange Pick of the Week

Clear all but specified variables

Posted by Doug Hull,

KEEP can be thought of as the complement to CLEAR. KEEP clears all variables from the workspace except for those specified. I find KEEP to be one of those functions I use so much that I forget it isn't part of MATLAB.

Comments are closed.

These postings are the author's and don't necessarily represent the opinions of MathWorks.