version (784 Bytes) by Amit Gaharwar
The clear_except function preserves the variables that are specified as its input arguments.


Updated 11 Aug 2004

No License

THe clear_except function can be used to preserve variables in the base workspace. Its complement to clear function in MATLAB.

clear var1 clears var1 and retains all other variables in the workspace while clear_except var1 will clear all the variables except var1 from the workspace.
clear_except var1 var2

Cite As

Amit Gaharwar (2022). clear_except (, MATLAB Central File Exchange. Retrieved .

MATLAB Release Compatibility
Created with R13
Compatible with any release
Platform Compatibility
Windows macOS Linux

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!