clear_except

The clear_except function preserves the variables that are specified as its input arguments.

Download
Download

You are now following this Submission

Cite As

Amit Gaharwar (2026). clear_except (https://www.mathworks.com/matlabcentral/fileexchange/5352-clear_except), 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

The error check condition has been put outside the for loop where it previously was there. This was done because program functioned fine with one variable but with more than one variables it always resulted in error condition.

Download