Consolidate workspace memory
pack
pack filename
pack('filename')
pack
frees up needed space
by reorganizing information so that it only uses the minimum memory
required. All variables from your base and global workspaces that
are less than 2GB are preserved. Any persistent variables that are
defined at the time are set to their default value (the empty matrix, []
).
Caution
The Do not use the |
The MATLAB® software temporarily stores your workspace data
in a file called tp######.mat
(where ######
is
a numeric value) that is located in your temporary folder. (You can
use the command dir(tempdir)
to see the files in
this folder).
pack filename
frees space
in memory, temporarily storing workspace data in a file specified
by filename
. This file resides in your current
working folder and, unless specified otherwise, has a .mat
file
extension.
pack('filename')
is the
function form of pack
.
Change the current folder to one that is writable, run pack
,
and return to the previous folder.
cwd = pwd; cd(tempdir); pack cd(cwd)