【发布时间】:2014-05-22 09:50:30
【问题描述】:
有没有办法只删除脚本末尾在 matlab 脚本中生成的变量,而不删除脚本中未生成的工作区的任何其他变量?
注意:脚本不是函数。
基本上我想在一行
中执行以下操作save abc.mat % saves the whole workspace
some_script % call the script
clear % deletes the variables created by the script along with the whole workspace
load abc.mat % again loads the whole earlier workspace
【问题讨论】:
-
some_script会清除工作区吗? -
使用
structures作为“删除”变量。 -
编辑后,现在您的标题和评论 -
deletes the variables created by the script along with the whole workspace与我认为矛盾或至少令人困惑。 -
我很抱歉造成误解,我以为你在问我在问题中写的那段代码。我将删除评论。是的,我希望
some_script删除它创建的变量。
标签: matlab