hi:
how can i define zeros(10000,10000) in matlab.
there is not any constraint in my pc memory.beacause i have a 320G
hard.but when i define matrix,matlab say:
a=zeros(8000,8000);
??? Error using ==> zeros
Out of memory. Type HELP MEMORY for your options.
zeros(?,?)
Started by ●October 23, 2008
Reply by ●October 23, 20082008-10-23
The constraint is on your RAM memory, not your Harddrive capacity.
Harddrive is just for storage.
The processing needs the RAM to compute data.
8000 x 8000 means you need 64Mil sized data array.
The standard with zeros function is in double, which means every number needs 8 byte.
So in total, this a = zeros(8000,8000) will need 64Mil x 8 byte = 512MB of data.
The matlab itself need around 100MB of memory to run.
Just to run matlab and make this variable, you need around ~650MB.
So, you need RAM memory at least 1GB, I guess.
I personally don't know how Matlab arrange the memory.
(I used Matlab 7.1)
With my 3GB memory, I often can only make data around 2GB.
If anyone could comes up with better explanation, it would be very welcome.
Kind Regards,
-wisnu-
________________________________
From: ali5264
To: m...
Sent: Wednesday, October 22, 2008 6:23:05 PM
Subject: [matlab] zeros(?,?)
hi:
how can i define zeros(10000, 10000) in matlab.
there is not any constraint in my pc memory.beacause i have a 320G
hard.but when i define matrix,matlab say:
a=zeros(8000, 8000);
??? Error using ==> zeros
Out of memory. Type HELP MEMORY for your options.
Harddrive is just for storage.
The processing needs the RAM to compute data.
8000 x 8000 means you need 64Mil sized data array.
The standard with zeros function is in double, which means every number needs 8 byte.
So in total, this a = zeros(8000,8000) will need 64Mil x 8 byte = 512MB of data.
The matlab itself need around 100MB of memory to run.
Just to run matlab and make this variable, you need around ~650MB.
So, you need RAM memory at least 1GB, I guess.
I personally don't know how Matlab arrange the memory.
(I used Matlab 7.1)
With my 3GB memory, I often can only make data around 2GB.
If anyone could comes up with better explanation, it would be very welcome.
Kind Regards,
-wisnu-
________________________________
From: ali5264
To: m...
Sent: Wednesday, October 22, 2008 6:23:05 PM
Subject: [matlab] zeros(?,?)
hi:
how can i define zeros(10000, 10000) in matlab.
there is not any constraint in my pc memory.beacause i have a 320G
hard.but when i define matrix,matlab say:
a=zeros(8000, 8000);
??? Error using ==> zeros
Out of memory. Type HELP MEMORY for your options.
Reply by ●October 23, 20082008-10-23
It doesn't have to do with your harddrive memory, it has to do with your
RAM
space.
Thats why you are running out.
Nandan
On Wed, Oct 22, 2008 at 9:23 AM, ali5264 wrote:
> hi:
> how can i define zeros(10000,10000) in matlab.
> there is not any constraint in my pc memory.beacause i have a 320G
> hard.but when i define matrix,matlab say:
> a=zeros(8000,8000);
> ??? Error using ==> zeros
> Out of memory. Type HELP MEMORY for your options.
>
space.
Thats why you are running out.
Nandan
On Wed, Oct 22, 2008 at 9:23 AM, ali5264 wrote:
> hi:
> how can i define zeros(10000,10000) in matlab.
> there is not any constraint in my pc memory.beacause i have a 320G
> hard.but when i define matrix,matlab say:
> a=zeros(8000,8000);
> ??? Error using ==> zeros
> Out of memory. Type HELP MEMORY for your options.
>
Reply by ●October 23, 20082008-10-23
You are completely wrigth.
But there is a way of creating this zeros matrix, creating them as int8.
Like this:
x = zeros(10000,10000,'int8');
This way, the required memory is reduced.
2008/10/23 Wisnumurti Kristanto
> The constraint is on your RAM memory, not your Harddrive capacity.
> Harddrive is just for storage.
> The processing needs the RAM to compute data.
>
> 8000 x 8000 means you need 64Mil sized data array.
> The standard with zeros function is in double, which means every number
> needs 8 byte.
> So in total, this a = zeros(8000,8000) will need 64Mil x 8 byte = 512MB of
> data.
>
> The matlab itself need around 100MB of memory to run.
> Just to run matlab and make this variable, you need around ~650MB.
> So, you need RAM memory at least 1GB, I guess.
>
> I personally don't know how Matlab arrange the memory.
> (I used Matlab 7.1)
> With my 3GB memory, I often can only make data around 2GB.
> If anyone could comes up with better explanation, it would be very welcome.
>
> Kind Regards,
> -wisnu-
>
> ________________________________
> From: ali5264 >
> To: m...
> Sent: Wednesday, October 22, 2008 6:23:05 PM
> Subject: [matlab] zeros(?,?)
>
> hi:
> how can i define zeros(10000, 10000) in matlab.
> there is not any constraint in my pc memory.beacause i have a 320G
> hard.but when i define matrix,matlab say:
>
> a=zeros(8000, 8000);
> ??? Error using ==> zeros
> Out of memory. Type HELP MEMORY for your options.
>
>
>
But there is a way of creating this zeros matrix, creating them as int8.
Like this:
x = zeros(10000,10000,'int8');
This way, the required memory is reduced.
2008/10/23 Wisnumurti Kristanto
> The constraint is on your RAM memory, not your Harddrive capacity.
> Harddrive is just for storage.
> The processing needs the RAM to compute data.
>
> 8000 x 8000 means you need 64Mil sized data array.
> The standard with zeros function is in double, which means every number
> needs 8 byte.
> So in total, this a = zeros(8000,8000) will need 64Mil x 8 byte = 512MB of
> data.
>
> The matlab itself need around 100MB of memory to run.
> Just to run matlab and make this variable, you need around ~650MB.
> So, you need RAM memory at least 1GB, I guess.
>
> I personally don't know how Matlab arrange the memory.
> (I used Matlab 7.1)
> With my 3GB memory, I often can only make data around 2GB.
> If anyone could comes up with better explanation, it would be very welcome.
>
> Kind Regards,
> -wisnu-
>
> ________________________________
> From: ali5264 >
> To: m...
> Sent: Wednesday, October 22, 2008 6:23:05 PM
> Subject: [matlab] zeros(?,?)
>
> hi:
> how can i define zeros(10000, 10000) in matlab.
> there is not any constraint in my pc memory.beacause i have a 320G
> hard.but when i define matrix,matlab say:
>
> a=zeros(8000, 8000);
> ??? Error using ==> zeros
> Out of memory. Type HELP MEMORY for your options.
>
>
>
Reply by ●October 23, 20082008-10-23
Also, I believe matlab attempts to allocate one continuous block of
memory when creating a single matrix/array/data structure and so even if
you have 512MB of free memory, it is unlikely a continuously free piece.
the HELP MEMORY command is actually somewhat useful in this situation.
If the OUT OF MEMORY error message is encountered, there is
no more room in memory for new variables. You must free up
some space before you may proceed. One way to free up space
is to delete some variables (see CLEAR). Another is to
issue the command PACK (See PACK). PACK compresses the data
in memory, opening up larger contiguous blocks.
Try clearing as much out of memory as possible and using pack to
organize the data in memory.
-Luke
Nandan Das wrote:
>
> It doesn't have to do with your harddrive memory, it has to do with
> your RAM
> space.
>
> Thats why you are running out.
>
> Nandan
>
> On Wed, Oct 22, 2008 at 9:23 AM, ali5264 > > wrote:
>
> > hi:
> > how can i define zeros(10000,10000) in matlab.
> > there is not any constraint in my pc memory.beacause i have a 320G
> > hard.but when i define matrix,matlab say:
> >
> >
> > a=zeros(8000,8000);
> > ??? Error using ==> zeros
> > Out of memory. Type HELP MEMORY for your options.
> >
--
Luke Winslow, Associate Research Specialist
University of Wisconsin - Madison
Mailing Address:
680 N. Park St.
Madison, WI 53706
Phone: (608) 262-5953
Cell: (608) 482-2357
memory when creating a single matrix/array/data structure and so even if
you have 512MB of free memory, it is unlikely a continuously free piece.
the HELP MEMORY command is actually somewhat useful in this situation.
If the OUT OF MEMORY error message is encountered, there is
no more room in memory for new variables. You must free up
some space before you may proceed. One way to free up space
is to delete some variables (see CLEAR). Another is to
issue the command PACK (See PACK). PACK compresses the data
in memory, opening up larger contiguous blocks.
Try clearing as much out of memory as possible and using pack to
organize the data in memory.
-Luke
Nandan Das wrote:
>
> It doesn't have to do with your harddrive memory, it has to do with
> your RAM
> space.
>
> Thats why you are running out.
>
> Nandan
>
> On Wed, Oct 22, 2008 at 9:23 AM, ali5264 > > wrote:
>
> > hi:
> > how can i define zeros(10000,10000) in matlab.
> > there is not any constraint in my pc memory.beacause i have a 320G
> > hard.but when i define matrix,matlab say:
> >
> >
> > a=zeros(8000,8000);
> > ??? Error using ==> zeros
> > Out of memory. Type HELP MEMORY for your options.
> >
--
Luke Winslow, Associate Research Specialist
University of Wisconsin - Madison
Mailing Address:
680 N. Park St.
Madison, WI 53706
Phone: (608) 262-5953
Cell: (608) 482-2357
Reply by ●October 24, 20082008-10-24
You can also try increasing your virtual memory size. You can increase your RAM
size virtually, it maybe slow though
My Computer->properties->Advanced->Performance/Settings->Advanced.
-S
________________________________
From: ali5264
To: m...
Sent: Wednesday, October 22, 2008 9:23:05 AM
Subject: [matlab] zeros(?,?)
hi:
how can i define zeros(10000, 10000) in matlab.
there is not any constraint in my pc memory.beacause i have a 320G
hard.but when i define matrix,matlab say:
a=zeros(8000, 8000);
??? Error using ==> zeros
Out of memory. Type HELP MEMORY for your options.
My Computer->properties->Advanced->Performance/Settings->Advanced.
-S
________________________________
From: ali5264
To: m...
Sent: Wednesday, October 22, 2008 9:23:05 AM
Subject: [matlab] zeros(?,?)
hi:
how can i define zeros(10000, 10000) in matlab.
there is not any constraint in my pc memory.beacause i have a 320G
hard.but when i define matrix,matlab say:
a=zeros(8000, 8000);
??? Error using ==> zeros
Out of memory. Type HELP MEMORY for your options.
Reply by ●October 24, 20082008-10-24
Make:
a = zeros(8000,8000,'int8');
Regards,
Ion
2008/10/23 Luke Winslow
> Also, I believe matlab attempts to allocate one continuous block of
> memory when creating a single matrix/array/data structure and so even if
> you have 512MB of free memory, it is unlikely a continuously free piece.
>
> the HELP MEMORY command is actually somewhat useful in this situation.
>
> If the OUT OF MEMORY error message is encountered, there is
> no more room in memory for new variables. You must free up
> some space before you may proceed. One way to free up space
> is to delete some variables (see CLEAR). Another is to
> issue the command PACK (See PACK). PACK compresses the data
> in memory, opening up larger contiguous blocks.
>
> Try clearing as much out of memory as possible and using pack to
> organize the data in memory.
>
> -Luke
> Nandan Das wrote:
> >
> > It doesn't have to do with your harddrive memory, it has to do with
> > your RAM
> > space.
> >
> > Thats why you are running out.
> >
> > Nandan
> >
> > On Wed, Oct 22, 2008 at 9:23 AM, ali5264
> > >> wrote:
> >
> > > hi:
> > > how can i define zeros(10000,10000) in matlab.
> > > there is not any constraint in my pc memory.beacause i have a 320G
> > > hard.but when i define matrix,matlab say:
> > >
> > >
> > > a=zeros(8000,8000);
> > > ??? Error using ==> zeros
> > > Out of memory. Type HELP MEMORY for your options.
> > >
> >
> > --
>
> Luke Winslow, Associate Research Specialist
> University of Wisconsin - Madison
>
> Mailing Address:
> 680 N. Park St.
> Madison, WI 53706
>
> Phone: (608) 262-5953
> Cell: (608) 482-2357
>
>
>
a = zeros(8000,8000,'int8');
Regards,
Ion
2008/10/23 Luke Winslow
> Also, I believe matlab attempts to allocate one continuous block of
> memory when creating a single matrix/array/data structure and so even if
> you have 512MB of free memory, it is unlikely a continuously free piece.
>
> the HELP MEMORY command is actually somewhat useful in this situation.
>
> If the OUT OF MEMORY error message is encountered, there is
> no more room in memory for new variables. You must free up
> some space before you may proceed. One way to free up space
> is to delete some variables (see CLEAR). Another is to
> issue the command PACK (See PACK). PACK compresses the data
> in memory, opening up larger contiguous blocks.
>
> Try clearing as much out of memory as possible and using pack to
> organize the data in memory.
>
> -Luke
> Nandan Das wrote:
> >
> > It doesn't have to do with your harddrive memory, it has to do with
> > your RAM
> > space.
> >
> > Thats why you are running out.
> >
> > Nandan
> >
> > On Wed, Oct 22, 2008 at 9:23 AM, ali5264
> > >> wrote:
> >
> > > hi:
> > > how can i define zeros(10000,10000) in matlab.
> > > there is not any constraint in my pc memory.beacause i have a 320G
> > > hard.but when i define matrix,matlab say:
> > >
> > >
> > > a=zeros(8000,8000);
> > > ??? Error using ==> zeros
> > > Out of memory. Type HELP MEMORY for your options.
> > >
> >
> > --
>
> Luke Winslow, Associate Research Specialist
> University of Wisconsin - Madison
>
> Mailing Address:
> 680 N. Park St.
> Madison, WI 53706
>
> Phone: (608) 262-5953
> Cell: (608) 482-2357
>
>
>
Reply by ●October 26, 20082008-10-26
hi dears:
thanks a lot from your favors.but i fotrgot to explain that my Ram is
2Gb and i increased my virtual spase to 7Gb.neverthless i can not
define 2 or more such matrix.i want to define adjacency and weight
matrix for pixels of a m*n image.you now that i have to define a
(m*n)*(m*n) for either adjacency or weight matrixes for my porpuse.my
problem is how can i define these matrixes?you khow that even if i
define them my running time is surprising.so what can i do?how can i
compute these matrixes?
best regards.....
thanks a lot from your favors.but i fotrgot to explain that my Ram is
2Gb and i increased my virtual spase to 7Gb.neverthless i can not
define 2 or more such matrix.i want to define adjacency and weight
matrix for pixels of a m*n image.you now that i have to define a
(m*n)*(m*n) for either adjacency or weight matrixes for my porpuse.my
problem is how can i define these matrixes?you khow that even if i
define them my running time is surprising.so what can i do?how can i
compute these matrixes?
best regards.....
Reply by ●October 26, 20082008-10-26
Well you can either increase your virtual memory, get all teh memory you want or
use Sparse matrices
a=sparse(zeros(10000,10000));
hi:
>how can i define zeros(10000,10000) in matlab.
>there is not any constraint in my pc memory.beacause i have a 320G
>hard.but when i define matrix,matlab say:
>a=zeros(8000,8000);
>??? Error using ==> zeros
>Out of memory. Type HELP MEMORY for your options.
a=sparse(zeros(10000,10000));
hi:
>how can i define zeros(10000,10000) in matlab.
>there is not any constraint in my pc memory.beacause i have a 320G
>hard.but when i define matrix,matlab say:
>a=zeros(8000,8000);
>??? Error using ==> zeros
>Out of memory. Type HELP MEMORY for your options.
Reply by ●October 26, 20082008-10-26
I am not sure why my other reply did not get posted.
Use Sparse matrices
a=sparse(zeros(10000,10000));
you would need the extra memory regardless.
-S
________________________________
From: sachin nanda
To: ali5264 ; m...
Sent: Thursday, October 23, 2008 9:40:07 AM
Subject: Re: [matlab] zeros(?,?)
You can also try increasing your virtual memory size. You can increase your RAM size virtually, it maybe slow though
My Computer->propertie s->Advanced- >Performance/ Settings- >Advanced.
-S
____________ _________ _________ __
From: ali5264
To: matlab@yahoogroups. com
Sent: Wednesday, October 22, 2008 9:23:05 AM
Subject: [matlab] zeros(?,?)
hi:
how can i define zeros(10000, 10000) in matlab.
there is not any constraint in my pc memory.beacause i have a 320G
hard.but when i define matrix,matlab say:
a=zeros(8000, 8000);
??? Error using ==> zeros
Out of memory. Type HELP MEMORY for your options.
Use Sparse matrices
a=sparse(zeros(10000,10000));
you would need the extra memory regardless.
-S
________________________________
From: sachin nanda
To: ali5264 ; m...
Sent: Thursday, October 23, 2008 9:40:07 AM
Subject: Re: [matlab] zeros(?,?)
You can also try increasing your virtual memory size. You can increase your RAM size virtually, it maybe slow though
My Computer->propertie s->Advanced- >Performance/ Settings- >Advanced.
-S
____________ _________ _________ __
From: ali5264
To: matlab@yahoogroups. com
Sent: Wednesday, October 22, 2008 9:23:05 AM
Subject: [matlab] zeros(?,?)
hi:
how can i define zeros(10000, 10000) in matlab.
there is not any constraint in my pc memory.beacause i have a 320G
hard.but when i define matrix,matlab say:
a=zeros(8000, 8000);
??? Error using ==> zeros
Out of memory. Type HELP MEMORY for your options.






