How to Clear all Variables of a Workspace Except for Those Explicitly Excluded?

42 次查看(过去 30 天)
How do I clear all variables of a workspace except for those that I explicitly mention not to be cleared?

采纳的回答

Jan
Jan 2017-3-15
编辑:Jan 2017-3-15
clearvars -except keepVariables
I recommend to use functions. Then there is no need to clear workspace variables. For larger projects it is very useful, if the workspace is kept clean, instead of applying method to clean them manually.

更多回答(1 个)

ES
ES 2017-3-15

类别

Help CenterFile Exchange 中查找有关 Workspace Variables and MAT-Files 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by