Group data during import of .dat file.

2 次查看(过去 30 天)
Hammad
Hammad 2019-10-5
I have this data which is given below (and a .dat file is also attaced: actual data is very large this is only a scaled-down version to give an idea).
Thsis data has three groups.
each group have ID, date, time and, location.
I want to import data into matlab, and I wannt to put data into a structures based on ID. I also need to extarct ID date and time from this file.
Currently I can import data, my imported data is in three coulmns but I cant figure out how to separate three groups.
First Data Group
ID: 1122
Date: 05-10-2019
Time: 17:30
Location: New York
----Readings----
First column: time (s)
Second column: Distance Travelled (m)
Third column: Position. (m)
0.0000 5.1825 -0.9648
0.100 5.1181 -0.9092
0.200 5.0538 -0.8548
0.300 4.9896 -0.8014
0.400 4.9256 -0.7492
0.500 4.8617 -0.6980
0.600 4.7980 -0.6479
0.700 4.7344 -0.5989
0.800 4.6709 -0.5510
0.900 4.6076 -0.5042
1.000 4.5444 -0.4584
Second Data Group
ID: 1123
Date: 05-10-2019
Time: 17:35
Location: New York
----Readings----
First column: time (s)
Second column: Distance Travelled (m)
Third column: Position. (m)
0.0000 5.1825 -0.9648
0.100 5.1181 -0.9092
0.200 5.0538 -0.8548
0.300 4.9896 -0.8014
0.400 4.9256 -0.7492
0.500 4.8617 -0.6980
0.600 4.7980 -0.6479
0.700 4.7344 -0.5989
0.800 4.6709 -0.5510
0.900 4.6076 -0.5042

回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Large Files and Big Data 的更多信息

产品


版本

R2019a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by