help-octave
[Top][All Lists]
Advanced

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

Re: Loading ASCII data files quickly


From: Christoph Ellenberger
Subject: Re: Loading ASCII data files quickly
Date: Mon, 10 Aug 2009 21:00:26 +0200
User-agent: KMail/1.9.9

On Monday 10 August 2009 17.24:42 Matthias Brennwald wrote:
> On Aug 10, 2009, at 5:03 PM, Christoph Ellenberger wrote:
> > I usually use sed to straighten the data and then do the load
> > thing....
> > something like:
> >
> > cmd=['sed -n -e "/^ *[0-9]/p" ' fname  ">" Tfname];
> > if (system(cmd,1))
> >   error("Fehler 1");
> > end
> >
> > xx=load(Tfname);
> >
> >
> > where fname is the filename and tfname is some temporary filename
> > which I remove afterword with....
> >
> > cmd=["rm " Tfname];
> > if (system(cmd,1))
> >    error("Fehler 4");
> > end
> >
> > but this depends on what structure do you want afterward. I
> > sometimes have the coulumnames in the file as well and create a
> > cellarray with the datapoints called Data.X, Data.Y etc. as well.
> >
> > Hope this helps
> > Christoph
>
> Ok, but this requires sed to be available. My code needs to work with
> non-unixy machines, too.

Actually this is code I use on a windows machine, because sed is available 
there as well :). I tested this with the sourceforge versions 3.0.5 MSVC and 
the newer 3.2.0 mingw. works like a charm.

>
> ----
> Matthias Brennwald, Käferholzstrasse 173, CH-8046 Zürich, +41 44 364
> 17 03



reply via email to

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