清除
Remove items from workspace, freeing up system memory
Syntax
清除
清除name1 ... nameN
clear -regexpexpr1 ... exprn
清除ItemType
Description
清除
从当前工作区中删除所有变量,从系统内存中释放它们。
清除
removes the variables, scripts, functions, or MEX-functionsname1 ... nameN
name1 ... nameN
from memory.
Ifname
is
一个函数,然后
清除
重新引导功能中的任何持续变量当前正在执行的脚本或函数,然后
清除
不删除它锁定的功能
mlock
, then清除
不删除它一个variable that is global, then
清除
removes it from the current workspace, but it remains in the global workspace
clear -regexp
删除与列出的任何正则表达式匹配的所有变量。此选项仅删除变量。expr1 ... exprn
Examples
Input Arguments
尖端
打电话
清除全部
,清除classes
, 和清除功能
降低代码性能,通常是不必要的。To clear one or more specific variables from the current workspace, use
清除
.name1 ... nameN
要清除当前工作空间中的所有变量,请使用
清除
或者清晰
.要清除所有全局变量,请使用
清除global
或者清晰–global
.To clear a particular class, use
清除
.myClass
To clear a particular function or script, use
清除
.函数名称
To clear all MEX functions, use
清除梅克斯
.
The
清除
函数可以删除您指定的变量。要删除除几个指定变量以外的所有内容,请使用清晰
instead.如果清除图形或图形对象的句柄,则不会删除对象本身。采用
删除
删除对象。另一方面,删除对象不会删除用于存储其手柄的变量(如果有的话)。The
清除
function does not clear Simulink®楷模。采用bdclose
instead.在Unix上®systems,
清除
does not affect the amount of memory allocated to the MATLAB process.