[Top][All Lists]

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

Re: Reading data from m files

From: Quentin Spencer
Subject: Re: Reading data from m files
Date: Tue, 16 Jan 2007 09:10:53 -0600
User-agent: Thunderbird (X11/20061219)

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


reply via email to

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