Recently Posted




Notice: SSI.php was unable to load a session! This may cause problems with logout and other functions - please make sure SSI.php is included before *anything* else in all your scripts! in /home/tutorial/public_html/mathforum/SSI.php on line 155

pack

pack Consolidate workspace memory.
performs memory garbage collection. Extended MATLAB sessions may cause memory to become fragmented, preventing
large variables from being stored. is a command that saves all variables on disk, clears the memory, and then
reloads the variables.

If you run out of memory often, here are some additional system
specific tips:
Windows: Increase virtual memory using the control panel.
Unix: Ask your system manager to increase your Swap Space.

You should cd to a directory where you have “write” permission to execute this command successfully. The following lines of code will help you accomplish the consolidation of workspace memory.

View CodeMATLAB
1
2
3
4
cwd = pwd;
cd(tempdir);

cd(cwd)

See also memory.

Tags: ,