Group data during import of .dat file.

조회 수: 3 (최근 30일)
Hammad
Hammad 2019년 10월 5일
답변: BhaTTa 2025년 6월 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

답변 (1개)

BhaTTa
BhaTTa 2025년 6월 5일

카테고리

Help CenterFile Exchange에서 Shifting and Sorting Matrices에 대해 자세히 알아보기

제품


릴리스

R2019a

Community Treasure Hunt

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

Start Hunting!

Translated by