KEEP3

版本 1.0.0.0 (693 字节) 作者: Martin Barugel
Keeps the specified variables and clears the rest. Allows the use of the wildcard *...
3.2K 次下载
更新时间 2004/1/12

无许可证

This is another modified version of the original KEEP M-file by Xiaoning (David) Yang (1998). It allows the user to specify some variables and clear the rest, and uses the same syntax as the clear command. The main contribution of this code is that it allows the use of the wildcard * in exactly the same fashion as the clear command.

keep3 var1 var2
Clears all variables expect var1 and var2

keep3 va*2
Clears all variables expect those whose names begin with 'va' and end with '2'.

Requires Matlab 6.5 (R13) because it makes use of the regexp command.

引用格式

Martin Barugel (2024). KEEP3 (https://www.mathworks.com/matlabcentral/fileexchange/4259-keep3), MATLAB Central File Exchange. 检索来源 .

MATLAB 版本兼容性
创建方式 R13
兼容任何版本
平台兼容性
Windows macOS Linux
类别
Help CenterMATLAB Answers 中查找有关 Workspace Variables and MAT-Files 的更多信息
致谢

参考作品: keep

启发作品: Keep4

Community Treasure Hunt

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

Start Hunting!
版本 已发布 发行说明
1.0.0.0

Fixed a bug that caused KEEP3 to clear all variables when there where no variables to clear. It now works just fine.