help-octave
[Top][All Lists]
Advanced

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

regex-matched formatted input, or selecting a few columns in a CSV file?


From: novakyu
Subject: regex-matched formatted input, or selecting a few columns in a CSV file?
Date: Wed, 16 Jan 2008 11:06:33 -0800

Hi,

I am trying to read from a CSV file, where all the numerical data is
on the 4th and 5th column (1-3rd columns contain additional
information about instruments). Is there a way to read it directly
into Octave using something similar to fscanf? So far, I've been
re-writing the data files using Perl and then loading it into Octave,
but it's getting a little tedious to keep doing it that way. Here's a
sample of the data that I want to read:

Record Length,2.500000e+03,,  -0.046000000000,  -1.44000,
Sample Interval,2.000000e-04,,  -0.045800000000,  -1.44000,
Trigger Point,2.300000000000e+02,,  -0.045600000000,  -1.44000,
,,,  -0.045400000000,  -1.44000,
,,,  -0.045200000000,  -1.44000,
,,,  -0.045000000000,  -1.44800,

As you can see, actual X and Y values are on the third and fourth columns.

Thank you,

Andrzej


reply via email to

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