help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: zeros(n)


From: Doug Stewart
Subject: Re: zeros(n)
Date: Tue, 16 Sep 2014 22:10:09 -0400



On Tue, Sep 16, 2014 at 9:52 PM, Ether Jones <address@hidden> wrote:
Is this a known bug?

When I use this:
A=zeros(20000);
... I get a memory error.

But when I use this:
for i=1:20000
A(i)=0;
endfor;
... it works fine.


See log below:


GNU Octave, version 3.6.4
Copyright (C) 2013 John W. Eaton and others.
This is free software; see the source code for copying conditions.
There is ABSOLUTELY NO WARRANTY; not even for MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE.  For details, type `warranty'.

Octave was configured for "i686-pc-mingw32".

Additional information about Octave is available at http://www.octave.org.

Please contribute if you find this software useful.
For more information, visit http://www.octave.org/get-involved.html

Read http://www.octave.org/bugs.html to learn how to submit bug reports.

For information about changes from previous versions, type `news'.

 - Use `pkg list' to see a list of installed packages.
 - MSYS shell available (K:\OctaveVS\msys).
 - Graphics backend: gnuplot.

octave-3.6.4.exe:1> A=zeros(20000);
error: memory exhausted or requested size too large for range of Octave's
index
type -- trying to return to prompt

octave-3.6.4.exe:1> for i=1:20000
> A(i)=0;
> endfor;

octave-3.6.4.exe:2>





--
View this message in context: http://octave.1599824.n4.nabble.com/zeros-n-tp4666552.html
Sent from the Octave - General mailing list archive at Nabble.com.

_______________________________________________
Help-octave mailing list
address@hidden
https://lists.gnu.org/mailman/listinfo/help-octave



zeros(4)
ans =

   0   0   0   0
   0   0   0   0
   0   0   0   0
   0   0   0   0

>> zeros(4,1)
ans =

   0
   0
   0
   0

--
DASCertificate for 206392


reply via email to

[Prev in Thread] Current Thread [Next in Thread]