Group data based on contiguous blocks of time
Show older comments
Consider data set as follows:
Time Col1 Col2 Col3
09:00:00 A B C
09:00:01 A B C
09:00:02 A B C
09:00:03 R B C
16:00:00 A B C
16:00:01 A B C
20:00:00 A B C
Data between 09:00:00 to 09:00:02 is considered as one event since time increment in 1 sec and Col 1 through Col 3 are same. I am trying to find start and end time for each event in a given set of data.
Desired output:
StartTime End Time Col1 Col2 Col3
09:00:00 09:00:02 A B C
09:00:03 09:00:03 R B C
16:00:00 16:00:01 A B C
20:00:00 20:00:00 A B C
How can I implement this (without using Statistics toolbox)?
Accepted Answer
More Answers (0)
Categories
Find more on Simulink 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!