help-octave
[Top][All Lists]
Advanced

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

Re: Is there something quicker than textscan?


From: PhilipNienhuis
Subject: Re: Is there something quicker than textscan?
Date: Mon, 19 Mar 2012 14:37:03 -0700 (PDT)

Nicholas Jankowski-2 wrote
> 
> just curious, for block datafiles I often just use some variant of
> load -ascii.  how does this compare with dlmread, other than I can
> specify a separator and I guess just part of the file? 
> 

Well, with dlmread, textread and textscan you can indeed specify that you
want just a part of a file to be read, rather than all of it.
That may be a huge advantage, i.e. to be able to skip or avoid lines that
don't fit in the general data format ("headers" and "footers").

In addition textscan & textread offer more fine-grained options for sorting
out & converting data while reading ("literals", reading numerals as text,
skipping columns, skipping comment lines/-blocks, etc etc).

FWIW, my own experience is that it is often quicker, more insightful &
reliable to pre-process data files (even big ones, GB size) in a text editor
(like notepad++, I even use that under Linux / Wine) before feeding it to
Octave using simpler text read options.
Sometimes notepad++ needs a bit of time for processing (minutes or so) but
the time needed for experiments on raw text files with repeated
load/dlmread/textscan/<whatever> runs before it finally works often turns
out comparatively adverse.

Philip


--
View this message in context: 
http://octave.1599824.n4.nabble.com/Is-there-something-quicker-than-textscan-tp4483991p4486582.html
Sent from the Octave - General mailing list archive at Nabble.com.


reply via email to

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