[Top][All Lists]

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

Reading data files

From: Dirk Eddelbuettel
Subject: Reading data files
Date: Wed, 11 Nov 1998 14:38:10 -0500 (EST)

  Jens>  Hi, I am using Octave often for simulations of experimental
  Jens> data. Therfore, I also have to read in these data. The data files
  Jens> usually start with a header with the experimental conditions,
  Jens> commented out with either a '%' or a '#'. While this leads to no
  Jens> problem e.g. with Matlab, Octave doesn't seem to like these header
  Jens> lines and complains (file name is `a1')

Use 'aload.m' (and 'asave.m') from the octave-ci package at

Note that JWE has just integrated a good bunch of these functions into the
pre-release of 2.0.14. 

  Jens> Is there a way to avoid having to edit each data file to remove the
  Jens> headers?  (Of course, on could easily delete the header with grep or
  Jens> friends, but this would mean to have every file twice and, besides, I
  Jens> forget to go through this procedure constantly...)

If you look at the source for aload/asave, you see how they quite smartly
embed Unix shell/awk/grep commands in .m files. That is a very useful
technique which one can adapt or extend.

Linux is not only free; it is, arguably, a better operating system, offering
a degree of stability and an ability to scale up that NT cannot match.
                                             -- The Economist, Oct 3, 1998

reply via email to

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