[Top][All Lists]

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

read file, given a non-octave header

From: the_verge
Subject: read file, given a non-octave header
Date: Fri, 26 Jan 2007 22:50:23 -0800 (PST)

Ok,  One more data loading quesiton:

I am loading a file that has some comment lines preceded by the '#'
character, and then two data description lines, and then the data.  The
first description line is a tab separated list of the variables in the file:

agency_cd       site_no parameter_cd    dd_nu   year_nu month_nu        mean_va

The second line is a list of the number of characters ("s") or numbers ("n")
each column takes up:

5s      15s     5s      3n      4s      2s      12n

Following that, the data is in columns corresponding to the previous two
description lines. 

What I want to do is load the data into appropriately named vectors, (some
of the columns are strings, some are numbers) just using the information
from the first two "description lines."  I am doing this a vast number of
times, so automation is necessary (in other words, I can't edit each file by
hand to put it into a certain format).

How do I parse this out?  
View this message in context:
Sent from the Octave - General mailing list archive at

reply via email to

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