clear
Remove objects from MATLAB client workspace
Syntax
Description
clear
removes the object
obj
obj
from the MATLAB® client workspace.
Note
To remove variables from the workspace of pool or cluster workers,
use parfevalOnAll
to
run the clear
function on the workers to preserve
workspace transparency. If you try to use clear
directly in a parfor
-loop or
spmd
block, you encounter an error. For more
information, see Ensure Transparency in parfor-Loops or spmd Statements.
Examples
Input Arguments
Tips
If the object obj
references an object in the cluster, this
function clears it from the workspace, but it remains in the cluster. You can restore
obj
to the workspace with the parcluster
, findJob
, or findTask
function, or with the
Jobs
or Tasks
property.
Version History
Introduced before R2006a
See Also
createJob
| createTask
| findJob
| findTask
| parcluster