How to split up a large dataset into separate sub-datasets?
显示 更早的评论
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!
采纳的回答
更多回答(0 个)
类别
在 帮助中心 和 File Exchange 中查找有关 Whos 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!