How to split up a large dataset into separate sub-datasets?
Show older comments
Hello everyone,
I'm working on a analysis of a large dataset which exists of multiple measurements in time at multiple locations. All datasets are stored under each other in a big text file. It looks like this:
[2] [2011] [location1] [other info]
[X1] [Y1] [X2] [Y2] ...... [Xi] [Yj]
[2] [2012] [location1] [other info]
[X1] [Y1] [X2] [Y2] ...... [Xi] [Yj]
[2] [20xx] [locationx] [other info]
[X1] [Y1] [X2] [Y2] ...... [Xi] [Yj]
All subdataset titles start with the number 2. The amount of measurements differs per subdataset. What I would like to have is one large structure which contains all measurements separately, from which I can easily extract data of some specific years/locations to make comparisons. I was hoping to find some method with which Matlab could recognize the start of a new subdataset, and then write this data into a field of a structure, and use some kind of loop to do this for all subdatasets. However, I was unable to fix this and unfortunately could not find any similar questions on the internet. I hope someone could help me. Thanks!
Accepted Answer
More Answers (0)
Categories
Find more on Environment and Settings 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!