Read data from a complex file
Show older comments
Hi Help,
I'm trying to read the data from this kind of file. Here the headers repeat randomly at various rows and first column data is date of the year. I tried using load and readmatrix functions, but no luck. Any thoughts?
Data file has four columns. First column data is day (mm-dd-yy). Header labels from each row repeats across the file but not periodically.
header header2 header3 header4
4-25-16 5 6 7
4-25-16 24 2 25
header header2 header3 header4
4-25-16 52 62 72
4-25-17 2 24 2
4-25-18 52 62 72
4-25-19 25 26 28
header header2 header3 header4
4-25-19 52 62 72
header header2 header3 header4
4-25-19 52 62 72
4-25-20 2 24 2
4-25-21 52 62 72
4-25-22 25 26 28
4-25-23 5 6 7
4-25-24 24 2 25
header header2 header3 header4
4-25-24 5 6 7
4-25-25 24 2 25
Accepted Answer
More Answers (0)
Categories
Find more on Text Files in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!