how to split up column vectors into separate vectors from data
显示 更早的评论
I have a large amount of data. I'm using import data function. The data is tracking information, the first column is the time period starting at 1....n , but n is usually different. Each time it repeats i.e time starts at 1 again, its tracking a different thing, so I want to split up the data into seperate vectors so I can look at them seperatly, rather than just have one long column vector. The data has 4 columns, including the time period, so I want to group them together for each new track. Or is there a simpler way to analyze each track?
Thanks in advance!
采纳的回答
更多回答(1 个)
dpb
2019-5-28
1 个投票
Build a ThingNum tracking id variable for each and then use findgroups and splitapply to analyze by group however desired.
The ID variable is relatively easy to build given you can find all locations with Time==1 and then each sequence from first element to the subsequent less one is the given event.
类别
在 帮助中心 和 File Exchange 中查找有关 Logical 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!