out of memory #39

  • Follow


Hi,

>> close all;
>> z=zeros(601,601,7)
??? Out of memory. Type HELP MEMORY for your options.

>> 601*601*7*8

ans =

    20227256

why?

Mike
0
Reply sulfateion (350) 10/27/2011 12:23:54 PM

Mike <sulfateion@gmail.com> wrote in message <35e3e806-a642-42cb-b990-9fc7b0ba80c1@m5g2000prg.googlegroups.com>...
> Hi,
> 
> >> close all;
> >> z=zeros(601,601,7)
> ??? Out of memory. Type HELP MEMORY for your options.
> 
> >> 601*601*7*8
> 
> ans =
> 
>     20227256
> 
> why?
> 
> Mike
may be because you have loaded some variables into your workspace. type this;

clear all

also clear the workspace and then run your program again. it should not give this message again
0
Reply salmanabdullah9 (206) 10/27/2011 12:33:10 PM



"Mike" <sulfateion@gmail.com> wrote in message 
news:35e3e806-a642-42cb-b990-9fc7b0ba80c1@m5g2000prg.googlegroups.com...
> Hi,
>
>>> close all;
>>> z=zeros(601,601,7)
> ??? Out of memory. Type HELP MEMORY for your options.

Assuming you're using the built-in ZEROS function and not one that you or 
someone else has written that shadows the built-in function (you can check 
this with the WHICH function) such a matrix would require:

>> numElements = 601*601*7;
>> bytes = numElements*8;
>> mb = bytes/(1024^2)

mb =

   19.2902

under 20 MB of memory. That's not a lot, which suggests that your memory may 
be extremely fragmented and so MATLAB can't get a contiguous block of 
19.29... MB of memory. Take a look at sections 2 and 3 in this document for 
information on how you can check this and how to correct that problem.

http://www.mathworks.com/support/tech-notes/1100/1106.html

-- 
Steve Lord
slord@mathworks.com
To contact Technical Support use the Contact Us link on 
http://www.mathworks.com 

0
Reply slord (13276) 10/27/2011 1:14:48 PM

On Oct 27, 9:14=A0pm, "Steven_Lord" <sl...@mathworks.com> wrote:
> "Mike" <sulfate...@gmail.com> wrote in message
>
> news:35e3e806-a642-42cb-b990-9fc7b0ba80c1@m5g2000prg.googlegroups.com...
>
> > Hi,
>
> >>> close all;
> >>> z=3Dzeros(601,601,7)
> > ??? Out of memory. Type HELP MEMORY for your options.
>
> Assuming you're using the built-in ZEROS function and not one that you or
> someone else has written that shadows the built-in function (you can chec=
k
> this with the WHICH function) such a matrix would require:
>
> >> numElements =3D 601*601*7;
> >> bytes =3D numElements*8;
> >> mb =3D bytes/(1024^2)
>
> mb =3D
>
> =A0 =A019.2902
>
> under 20 MB of memory. That's not a lot, which suggests that your memory =
may
> be extremely fragmented and so MATLAB can't get a contiguous block of
> 19.29... MB of memory. Take a look at sections 2 and 3 in this document f=
or
> information on how you can check this and how to correct that problem.
>
> http://www.mathworks.com/support/tech-notes/1100/1106.html
>
> --
> Steve Lord
> sl...@mathworks.com
> To contact Technical Support use the Contact Us link onhttp://www.mathwor=
ks.com

Thanks for the reply.
I remember I 'clear all'. There is no out of memory now.
Mike
0
Reply sulfateion (350) 10/29/2011 7:02:04 AM

3 Replies
41 Views

(page loaded in 0.315 seconds)

Similiar Articles:













7/30/2012 6:14:02 AM


Reply: