Memory Management Functions

The following functions can help you to manage memory use while running the MATLAB software:

You can use the save and load functions in conjunction with the quit command to free memory by:

  1. Saving any needed variables with the save function.

  2. Quitting MATLAB to free all memory allocated to MATLAB.

  3. Starting a new MATLAB session and loading the saved variables back into the clean MATLAB workspace.

The whos Function

The whos command can give you an idea of the memory used by MATLAB variables.

A = ones(10,10);
whos
   Name       Size            Bytes  Class     Attributes
   A         10x10              800  double 

Note that whos does not include information about

  


 © 1984-2008- The MathWorks, Inc.    -   Site Help   -   Patents   -   Trademarks   -   Privacy Policy   -   Preventing Piracy   -   RSS