Path: news.mathworks.com!newsfeed-00.mathworks.com!nlpi057.nbdc.sbc.com!prodigy.net!flph199.ffdc.sbc.com!prodigy.com!flpi107.ffdc.sbc.com!nlpi068.nbdc.sbc.com.POSTED!ffbda4aa!not-for-mail
Reply-To: "Nasser Abbasi" <nma@12000.org>
From: "Nasser Abbasi" <nma@12000.org>
Newsgroups: comp.soft-sys.matlab
References: <gjupaq$jeu$1@fred.mathworks.com>
Subject: Re: Array of Images Running out of memory
Lines: 41
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.3138
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.3350
X-RFC2646: Format=Flowed; Original
Message-ID: <NyD8l.12460$yr3.1008@nlpi068.nbdc.sbc.com>
NNTP-Posting-Host: 75.43.171.128
X-Complaints-To: abuse@prodigy.net
X-Trace: nlpi068.nbdc.sbc.com 1231226157 ST000 75.43.171.128 (Tue, 06 Jan 2009 02:15:57 EST)
NNTP-Posting-Date: Tue, 06 Jan 2009 02:15:57 EST
Organization: at&t http://my.att.net/
X-UserInfo1: OXZUSWKOG@C_GFLYZBNXKQ@@AZJLCQLIQQ]ZMVMHQAVTUZ]CLNTCPFK[WDXDHV[K^FCGJCJLPF_D_NCC@FUG^Q\DINVAXSLIFXYJSSCCALP@PB@\OS@BITWAH\CQZKJMMD^SJA^NXA\GVLSRBD^M_NW_F[YLVTWIGAXAQBOATKBBQRXECDFDMQ\DZFUE@\JM
Date: Mon, 5 Jan 2009 23:15:51 -0800
Xref: news.mathworks.com comp.soft-sys.matlab:509964



"Arron S" <aps@uwm.edu> wrote in message 
news:gjupaq$jeu$1@fred.mathworks.com...
>I am very very new to matlab and have written my first M-file. It is 
>functional for a test set of 38 images but my data sets are in the range of 
>400. (144x512)
>

  400*144*512*4  is only about 118 MBytes  I do not see why your PC can't 
manage this. Here is a small test on my Matlab

EDU>> clear all
EDU>> memory
Maximum possible array:            1120 MB (1.174e+009 bytes) *
Memory available for all arrays:   1529 MB (1.603e+009 bytes) **
Memory used by MATLAB:              245 MB (2.573e+008 bytes)
Physical Memory (RAM):             3327 MB (3.489e+009 bytes)

*  Limited by contiguous virtual address space available.
** Limited by virtual address space available.

EDU>> A=zeros(144,512,400);

EDU>> memory
Maximum possible array:             895 MB (9.383e+008 bytes) *
Memory available for all arrays:   1304 MB (1.367e+009 bytes) **
Memory used by MATLAB:              470 MB (4.932e+008 bytes)
Physical Memory (RAM):             3327 MB (3.489e+009 bytes)

*  Limited by contiguous virtual address space available.
** Limited by virtual address space available.
EDU>>

So, you see that memory used by Matlab increased from 245 to 470, or by 225 
MB only. So, I am not sure why you are getting the memory error.  How much 
RAM does your PC have? Why not set a break point on error, and look at the 
memory then? May be you are using memory somewhere else in the program?

--Nasser