how to split up column vectors into separate vectors from data
Mostrar comentarios más antiguos
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!
Respuesta aceptada
Más respuestas (1)
dpb
el 28 de Mayo de 2019
1 voto
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.
Categorías
Más información sobre Logical en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!