help-octave
[Top][All Lists]
Advanced

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

Re: reading file


From: Jonathan Stickel
Subject: Re: reading file
Date: Tue, 26 Feb 2008 08:49:52 -0700
User-agent: Thunderbird 2.0.0.9 (Macintosh/20071031)

On 2/26/08 address@hidden wrote:
From: marco cammarata <address@hidden>
Subject: Re: reading file
To: Michael Goffioul <address@hidden>
Cc: address@hidden
Message-ID: <address@hidden>
Content-Type: text/plain; charset="us-ascii"

Dear Stefan and Michael,

Thanks for your suggestions.
I found a function "textread" in the io package of octave-forge that do
the job reasonably.

I then created an octave "library" to read the file.
After having loaded the library (source "lib.octave")
then
data=read_diagnostic(0);
would do the job returning a structure.
On my computer Xeon(TM) CPU 3.06GHz with octave 3.0
it takes 0.5 second to read the attached diagnostics.log
What is funny is that if i skip the first 150 lines (out of 160)
with the following syntax
data=read_diagnostic(150);
It takes the same time ! (note that the second execution of the command
is always a bit faster, I'm referring to the first call).

Do you think a oct-file might speed up even further ?
I have no idea on how to write oct file,
any suggestion of something to read ?

regards,
marco

From what I recall from your original message, I think you are looking for a function like Matlab's "importdata" that can read the columns of a data file into a structure with fieldnames given by the header of the file. I have plans to write exactly that function as a c++/oct file (for the reason of speed), but I am not sure when I will have the time. My plan is to adapt the the code from dlmread.cc that was recently added to octave-forge. You are welcome to look at that code if you are interested in trying to make some progress yourself.

Regards,
Jonathan


reply via email to

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