keep5

Retains variables specified in input but clears all others.

You are now following this Submission

Yet another version of KEEP. However the implementation is different.

This one supports exactly same input argument as CLEAR; for example, wildcard *, 'global', '-regexp' all works.

Cite As

Siyi Deng (2026). keep5 (https://in.mathworks.com/matlabcentral/fileexchange/15214-keep5), 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.0