Select Data Column With Header are not in the first row

3 次查看(过去 30 天)
Hi,
I wanna read each data in columns but the header were not in the first row. The headers are located in the 13th row right after 12 introduction headers above it. The data format are like these :
Format IAGA-2002 |
Source of Data |
Station Name |
IAGA Code ABK |
Geodetic Latitude -68.367 |
Geodetic Longitude 18.817 |
Elevation |
Reported XYZF |
Sensor Orientation |
Digital Sampling |
Data Interval Type PT1M |
Data Type DEFINITIVE |
DATE TIME DOY ABKX ABKY ABKZ ABKF |
1989-11-01 00:00:00.000 305 11575.00 746.00 51129.00 99999.00 .............. (Column Data which i want to read or plot)
1989-11-01 00:01:00.000 305 11575.00 747.00 51132.00 99999.00
1989-11-01 00:02:00.000 305 11576.00 750.00 51134.00 99999.00
1989-11-01 00:03:00.000 305 11576.00 749.00 51135.00 99999.00
1989-11-01 00:04:00.000 305 11575.00 750.00 51137.00 99999.00
How do i select or plot data column in the DATE header and ABKZ header?
Thank you very much.

采纳的回答

Mathieu NOE
Mathieu NOE 2021-5-3
hello
see below example :
opts = detectImportOptions("Document1.txt","NumHeaderLines",12);
opts.SelectedVariableNames = ["DATE","ABKZ"];
T = readtable("Document1.txt",opts)
C = table2cell(T);

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Cluster Configuration 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by