Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

matlab "memory" function on mac?

Tags:

memory

matlab

On Windows machines, MATLAB users can use either the memory or the feature memstats commands. However, neither of these work on a machine, failing as follows:

>> memory
??? Error using ==> memory
Function MEMORY is not available on this platform.

>> feature memstats
??? Error using ==> feature
An unknown feature was specified

Does anyone know of a way to access information about in-matlab memory usage on a Mac?

like image 957
eykanal Avatar asked Jan 21 '11 17:01

eykanal


People also ask

How do I check memory usage in MATLAB?

Retrieve Memory Information Use the structure to display the amount of memory reserved for the MATLAB process. Return both the user-focused and system-focused memory information. Access the Available field of the PhysicalMemory structure to display the amount of available physical memory on the computer.

What is RAM function in MATLAB?

RAM System object reads and writes to specific locations in hRam . Code generation from hdl. RAM has the same restrictions as code generation from other System objects. For details, see Limitations of HDL Code Generation for System Objects.


2 Answers

I have not been able to find a command that reproduces the functionality of memory. However, if you know how much total memory your system has, you can use who (or vsize from the file exchange for more detail) to estimate how much memory your variables are currently using and thus how much free space you have.

By the way, you can always find out about Java memory by calling

java.lang.Runtime.getRuntime.maxMemory
java.lang.Runtime.getRuntime.totalMemory
java.lang.Runtime.getRuntime.freeMemory

Note that Matlab memory and Java memory are different - Java memory is used for UI, including figures, as well as other java objects, while memory reports the memory available for variables and calculations.

like image 93
Jonas Avatar answered Sep 18 '22 06:09

Jonas


memory is only available on Windows systems.

You can try using top built-in Mac command instead.

like image 33
phwd Avatar answered Sep 18 '22 06:09

phwd