Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

Thread Subject:
Extract depth and velocity data

Subject: Extract depth and velocity data

From: loh

Date: 30 Jul, 2014 04:54:11

Message: 1 of 1

I have a raw data which has the format of

"8996 20806 17710 21326
67 15 33 10 09 05 2013 29.8 20.9 100 50 6 40 0 0
13381 93
    4.85 93.1 331.8 180
    4.35 299.7 295.3 350
    3.85 1191.4 20.9 -12
    3.35 490.5 139.0 -227
    2.85 1283.8 293.6 -508
    2.35 424.2 171.0 -844
    1.85 506.6 251.7 -35
    1.35 1759.8 217.2 -197
    0.85 2644.5 102.4 -119
    0.35 722.1 275.3 -234
    -0.15 2653.1 253.3 -633
   -0.65 2133.8 279.9 -227
   -1.15 1141.0 295.5 -1212
   -1.65 1447.0 15.6 -268
   -2.15 2217.4 320.4 -1166
   -2.65 7233.4 40.6 1838

8996 20806 17710 21326
68 15 34 10 09 05 2013 29.8 20.9 100 50 6 40 0 0
13381 93
    4.85 895.2 250.1 201
    4.35 592.7 182.7 181
    3.85 911.7 195.9 -8
    3.35 571.1 271.0 -455
    2.85 2904.6 268.8 -835
    2.35 1599.3 332.8 -905
    1.85 1567.6 210.3 -99
    1.35 2998.1 323.5 -929
    0.85 4047.6 353.2 96
    0.35 1614.8 344.9 -283
   -0.15 2653.1 253.3 -633
   -0.65 2133.8 279.9 -227
   -1.15 1141.0 295.5 -1212
   -1.65 1447.0 15.6 -268
   -2.15 2217.4 320.4 -1166
   -2.65 7233.4 40.6 1838 "

** 1st row is ensemble number
** 2nd row is "<number> <hour> <minute> <second> <month> <day> <year> <temperature>...."
** 3rd row is no use number
** 4th row is "<depth> <velocity> <direction> <vertical_velocity>" and so as the following row until there is a new column of empty or space

then as we go different time to collect the data , the new set of data is separated by the column of empty and start a new set data


I want to extract the time , data , depth , velocity, direction and vertical velocity and put them into column and row as below
"
Date Time Depth Velocity Direction Vertical_velocity
09-05-2013 15:33:10 4.85 895.2 250.1 201
                                4.35 592.7 182.7 181
                                3.85 911.7 195.9 -8
                                3.35 571.1 271.0 -455
                                2.85 2904.6 268.8 -835
                                2.35 1599.3 332.8 -905
                                1.85 1567.6 210.3 -99
                                1.35 2998.1 323.5 -929
                                0.85 4047.6 353.2 96
                                0.35 1614.8 344.9 -283
                                -0.15 2653.1 253.3 -633
09-05-2013 15:34:10 4.85 93.1 331.8 180
                                4.35 299.7 295.3 350
                                3.85 1191.4 20.9 -12
                                3.35 490.5 139.0 -227
                                2.85 1283.8 293.6 -508
                                2.35 424.2 171.0 -844
                                1.85 506.6 251.7 -35
                                1.35 1759.8 217.2 -197
                                0.85 2644.5 102.4 -119
                                0.35 722.1 275.3 -234
                                -0.15 2653.1 253.3 -633
                                -0.65 2133.8 279.9 -227
                                -1.15 1141.0 295.5 -1212
                                -1.65 1447.0 15.6 -268

Anyone can help me on this ?

Tags for this Thread

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

Contact us