HELP! how do i read in multiline data blocks?
- From: "Arnico Panday" <my_first_name@xxxxxxxxxxxxxx>
- Date: Sun, 6 Nov 2005 03:07:33 -0500
Hi. I hope some kind soul would be able to help me out. Have been
spending days reading manuals on load, textread, textscan, dlmread,
fgetl, etc., and trying out various things, but I am not succeeding.
I need to read in about a month's worth of data from an acoustic
sounder, with one day of data per file. The datafiles I'm trying to
read have blocks of the following format repeated for each 15 minutes
time interval (i.e. at most 96 blocks per file):
BL# MONTH DAY YEAR HOUR MIN VAL1 VAL2 VAL3 VAL4
0 5 12 2005 0 15 1666 1023 1531 0
SPU1 SPU2 SPU3 SPU4 NOIS1 NOIS2 NOIS3 NOIS4 FEMAX SOFTW
2 3 1 0 381 381 364 0 63 8173
FE11 FE12 FE21 FE22 SNR1 SNR2 SNR3 SNR4 CHECK JAM
9 9 9 9 96 96 103 0 248 -9999
ALT CT SPEED DIR S DIR W SW SU SV INVMI AU
AV AW
500 -9999 -9999 -9999 -9999 -9999 -9999 -9999 -9999 -9999 -9999
-9999 -9999
450 -9999 -9999 -9999 -9999 -9999 -9999 -9999 -9999 -9999 -9999
-9999 -9999
400 -9999 -9999 -9999 -9999 -9999 -9999 -9999 -9999 -9999 -9999
-9999 -9999
350 -9999 -9999 -9999 -9999 -9999 -9999 -9999 -9999 -9999 856
216 527
300 111 368 223 21 -4 55 60 112 -9999 676
704 299
250 126 283 227 15 -3 32 61 72 -9999 693
875 379
200 148 253 223 13 3 24 40 54 -9999 237
736 484
150 183 215 218 13 8 21 40 48 150 253
481 407
100 233 257 219 9 13 23 39 40 100 297
381 423
50 239 233 219 11 25 21 42 44 161 431
247 471
$
_____________________
[sorry about line-wrapping, the lines in the data block are rather
long, but I think the pattern is visible]
Basically there are of of the following:
ONE HEADER LINE
ONE LINE OF TAB SEPARATED DATA
ONE EMPTY LINE
Then there is
ONE HEADER LINE
ONE EMPTY LINE
and then
10 lines of 13 columns.
and then a '$' signaling the end of the data block.
I know I want a loop that goes through one datablock at a time,
assigning the each datapoint data inside block n to position n in a
vector that collects all the data. But I'm very confused about how I
can build the interior of such a loop.
Any help would be highly appreciated!
Thanks a lot.
Arnico.
.
- Prev by Date: Re: Real-Time Workshop
- Next by Date: Re: Using Timer Fcns, passing arguments
- Previous by thread: Re: Real-Time Workshop
- Next by thread: elementary question on LMS
- Index(es):
Relevant Pages
|