No BSD License  

Highlights from
totalmem_ed.m

Be the first to rate this file! 0 Downloads (last 30 days) File Size: 1.07 KB File ID: #18708

totalmem_ed.m

by Eric

 

11 Feb 2008 (Updated 12 Feb 2008)

Displays the total memory allocated.

| Watch this File

File Information
Description

This is an extremely elementary function that tells you the total memory currently allocated in MB.

It accepts the whos command as an input argument. Which allows the code to see the total memory usage from outside of it's scope (being a function). It sums the bytes field of the structure for all variables.

The function uses variable outputs:
If no output variable is specified then a string in the command window is displayed that tells you the total MB in memory.
If an output variable is specified that variable is set to the total MB.

ex.
totalmem_ed(whos).m
bob = totalmem_ed(whos).m

MATLAB release MATLAB 7.4 (R2007a)
Other requirements None
Tags for This File  
Everyone's Tags
Tags I've Applied
Add New Tags Please login to tag files.
Please login to add a comment or rating.
Tag Activity for this File
Tag Applied By Date/Time
optimization Eric 22 Oct 2008 09:47:26
memory Eric 22 Oct 2008 09:47:26
total Eric 22 Oct 2008 09:47:26
total memory Eric 22 Oct 2008 09:47:26

Contact us at files@mathworks.com