how to split up column vectors into separate vectors from data
Show older comments
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!
Accepted Answer
More Answers (1)
dpb
on 28 May 2019
1 vote
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.
Categories
Find more on Logical 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!