[Top][All Lists]

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

Re: Reading data from m files

From: etienne
Subject: Re: Reading data from m files
Date: Tue, 16 Jan 2007 08:11:36 -0800 (PST)
User-agent: SquirrelMail/1.4.4

  Hi All,

I reached the same problem a while back. The reason I had for saving data
as code was that not all variables (structs, iirc) could be saved (at
least not in a matlab- & octave-compatible way, perhaps, I am not sure any
more).  I did not find any way of speeding things up.

  One (brute-force) solution could be to run a batch program to load each
of your files and save them in another format. This may take the night,
week-end or week, but once you have done that and changed your load/save
statements everywhere, you are through.



On Tue, January 16, 2007 7:10 am, Quentin Spencer said:
> Phil Fong wrote:
>>   I'm a long time Matlab user and I recently started
>> using Octave also.
>>   I have various programs (some written by me others
>> not) that export data into m-files which contain
>> something like "somevar = [ data data data; data data
>> data];"
>>   This makes it easy to load data into Matlab by
>> running the file.  However, in Octave this seems to be
>> extremely slow.  It takes over 6 minutes to read a
>> 9x19591 element matrix in using 2.1.74 from the FC4
>> package on a P4 3 GHz machine.
>>   Any ideas on speeding this up short of writing my
>> own m file parser?
> Why a .m file? It's just as easy (and faster) to load .mat or ascii
> files in both Octave and Matlab. The problem here is that the entire
> file must be processed by the command parser. Matlab's parser has become
> much faster than Octave's in recent versions, which exaplains the speed
> difference. If you really must keep your data in a .m file, then I think
> it would not be difficult to write a parser as you suggest, which I
> suspect would be much faster.
> Quentin
> _______________________________________________
> Help-octave mailing list
> address@hidden


reply via email to

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