Path: news.mathworks.com!not-for-mail
From: <HIDDEN>
Newsgroups: comp.soft-sys.matlab
Subject: Out of memory  when allocating
Date: Thu, 25 Sep 2008 10:43:01 +0000 (UTC)
Organization: The MathWorks, Inc.
Lines: 13
Message-ID: <gbfpvl$99v$1@fred.mathworks.com>
Reply-To: <HIDDEN>
NNTP-Posting-Host: webapp-02-blr.mathworks.com
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit
X-Trace: fred.mathworks.com 1222339381 9535 172.30.248.37 (25 Sep 2008 10:43:01 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Thu, 25 Sep 2008 10:43:01 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 1428858
Xref: news.mathworks.com comp.soft-sys.matlab:491932


Hi!
I'm trying to allocate some empty matrices that I will use in a for loop later on. They're quite big, and I keep getting the "Out of Memory" error message all the time, before I even started with my actual calculations!
Aside from the matrix I already have (matrix1, same size as empty ones), I want to allocate at first one matrix:

matrix2 = zeros(128,128,63,32);

After some work on matrix2 and 1, I then clear the original matrix1 and allocate a new one:

matrix3 = zeros(128,128,63,32);

Any this is where I get out of memory! I should only have 2 matrices in memory I guess. I changed my RAM from 2046 to to 4096. Can anyone give me some tips how to get around this problem?? Thanks!
/Ida