Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

New to MATLAB?

Thread Subject:
Out-of-memory problem

Subject: Out-of-memory problem

From: Liana

Date: 1 Nov, 2011 05:17:29

Message: 1 of 1


How can I solve the 'out-of-memory' problem? The thing is that I can execute my code only once. The second time I get the 'out-of-memory' message. After I restart MATLAB, the code works again, but only once.
To free up the memory, I am using:
munlock; clear all; clear functions. I also 'clear' variables inside the code.
However, it seems that these functions do not help at all.
For instance, below you can see the output of 'memory' command after running the code and applying 'clear all'. Memory used by MATLAB is the same before and after using 'clear all', i.e. 401 Mb.
>> clear all
>> memory
Maximum possible array: 2046 MB (2.146e+009 bytes) *
Memory available for all arrays: 3378 MB (3.542e+009 bytes) **
Memory used by MATLAB: 401 MB (4.202e+008 bytes)
Physical Memory (RAM): 3893 MB (4.082e+009 bytes)

Tags for this Thread

No tags are associated with this thread.

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

Contact us