help-octave
[Top][All Lists]
Advanced

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

Octave Limits


From: John W. Eaton
Subject: Octave Limits
Date: Fri, 21 Nov 2003 10:31:29 -0600

On 21-Nov-2003, Daryl Warkentin <address@hidden> wrote:

| First of all I am new to this list and just want to say thank you to all
| of the people who put so much hard work into octave. It's great.
| 
| Now the questions.
| 
| I am attempting to write some test data to a file and have bumped into
| the 2GB file size limit. Is there a really good reason why this limit
| exists other than maybe no one has gotten around to updating the code?
| If it is the code thing maybe I can help.

What kind of system are you using?  Does it support files larger than
2GB?

In the last day there has been some discussion about this on the
octave-maintainers mailing list, at least having to do with the type
of the value returned by ftell and used by fseek (which need to be
bigger than a 32-bit int to support large files).  But this may not be
enough to properly support large files.  If you'd like to contribute
to the discussion, then please subscribe to the octave-maintainers
list.

| Secondly, when I write values to a file they seem to take up way too
| much space and they can't be read properly. Below is an example script
| that shows what I mean.
| 
| octave:1> datafile=fopen('./datafile.dat', 'w+', 'native');
| octave:2> a = [0.1:0.1:1];
| octave:3> fwrite(datafile, a, 'double', 'native');

  octave:3> help fwrite
  fwrite is a built-in function
 
   - Built-in Function: COUNT = fwrite (FID, DATA, PRECISION, SKIP, ARCH)

If you want to specify ARCH, you also must specify SKIP.  But since
the default is 'native', then I don't think it is necessary here (or
in the fopen call).  Perhaps Octave should issue an error message
here, since you supplied SKIP as a string.  It used to do that, so I
will see about fixing it.

| octave:4> b=fread(datafile, length(a), 'double', 0, 'native');
| octave:5> b
| b = [](0x1)

You didn't rewind the file, so there was nothing to read.

jwe



-------------------------------------------------------------
Octave is freely available under the terms of the GNU GPL.

Octave's home on the web:  http://www.octave.org
How to fund new projects:  http://www.octave.org/funding.html
Subscription information:  http://www.octave.org/archive.html
-------------------------------------------------------------



reply via email to

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