Select Data Column With Header are not in the first row

3 views (last 30 days)
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.

Accepted Answer

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

More Answers (0)

Categories

Find more on Cluster Configuration in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!