Keep4

Keeps the listed variables in the calling workspace with a command format similar to "clear"

您现在正在关注此提交

This is another version of Keep, which allows a user to specify what variables are kept in the workspace of the calling routine. "Keep" compliments "Clear".

This version has been extended to match the command format of the "clear" command for clearing variables. Thus wildcards and regular expressions are allowed. The version also supports the "global" key word and Keep will not touch global variables unless the "global" key word is used.

Examples of supported formats:
keep var1 var2
keep var*
keep -regexp expr1
keep global
keep global var1
keep global -regexp expr1

引用格式

Mirko Hrovat (2026). Keep4 (https://ww2.mathworks.cn/matlabcentral/fileexchange/7129-keep4), MATLAB Central File Exchange. 检索时间: .

致谢

参考作品: keep, keep2, KEEP3

类别

Help CenterMATLAB Answers 中查找有关 Variables 的更多信息

一般信息

MATLAB 版本兼容性

  • 兼容任何版本

平台兼容性

  • Windows
  • macOS
  • Linux
版本 已发布 发行说明 Action
1.0.0.0

Updated comments to improve code metrics.