help-octave
[Top][All Lists]
Advanced

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

RE: Reading files is slow


From: Julian DeMarchi
Subject: RE: Reading files is slow
Date: Wed, 18 Sep 2002 14:32:56 -0400

Ah, welcome to open source.  Perhaps the following will work.

1. You should be able to read in any file as binary without prior conversion.
2. Try fread instead ('help fread').  Read to end-of-file (Inf/omit size parm).
3. Open file (fopen).  Read file (fread or similar).  fread can convert to type 
"char" for you.  Close file (fclose).
4. ?? perhaps a function available via octave-forge (http://octave.sf.net)

Let us know what works.

-----Original Message-----
From: Tom Kornack [mailto:address@hidden
Sent: Wednesday, September 18, 2002 2:17 PM
To: address@hidden
Cc: address@hidden
Subject: Re: Reading files is slow


Notes:

1. Indeed, I should clarify that I'm reading a text, tab-delimited 
file. Is there an easy way (is there a common tool) to convert this 
file into a binary file?

2. load seems to be finicky about carriage returns and line feeds. I 
work in an extremely heterogeneous computing environment. What is 
octave's requirement and is there a convenient tool to convert text 
files to have the appropriate line ending sequence?

3. Please excuse my skull thickness, but can you clarify this process 
of putting text data into a buffer by treating it as binary? I'm afraid 
I need some examples. And why wouldn't this be implemented in a decent 
text-data reading algorithm?

4. I can't find the procedure wavread. Is this shorthand or a procedure?

Tom


On Wednesday, Sep 18, 2002, at 14:13 America/New_York, Ramil G. Sagum 
wrote:

> don't read text data as text. treat the file as binary and put it into 
> a
> buffer. classifying a file as 'text' adds some processing. 
> (wavread-ing a
> 10Meg wave file, for example, takes only a few seconds.)



kornack.com
609-688-9077 (h), 609-258-0702 (w)
Fundamental Symmetries Lab, Princeton University
414C Devereux Avenue, Princeton, New Jersey 08540



-------------------------------------------------------------
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
-------------------------------------------------------------




-------------------------------------------------------------
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]