Time intervals overlap detection and sum
2 views (last 30 days)
Show older comments
Hello, I have a table with three columns, named: Name, Start, End:
Name Start End
________________ _______________________ _______________________
'SD060025' '2016/09/24 08:48:11.9' '2016/09/24 08:56:29.9'
'CSK1_0550' '2016/09/24 09:07:23.6' '2016/09/24 09:13:41.6'
'SAO160924_0555' '2016/09/24 09:12:23.3' '2016/09/24 09:18:41.3'
Name is the name of the object, Start is the start time of the object, End is its stop time. Start and End define a continuous time interval for object in Name column. I have these times in MATLAB serial date number format.
I want to compute:
- for each object, the cumulative time without overlapping
- for each pair of objects, the cumulative overlapping time of the 2 objects
- for each triplet of objects, the cumulative overlapping time of the 3 objects
- for each set of 4 objects, the cumulative overlapping time of the 4 objects
- and so on... until a set of 6 simultaneous objects
I've seen question Overlapping time-intervals WITHOUT for/while loops and it has helped me, but it is not enough because it does not process times.
Any idea?
Thank you very much
Alfredo
PS: I've found an alternative method which consist in analyzing the intervals one by one. For each interval, the elements of a vector of bins, each representing one minute, corresponding to the interval analyzed are incremented by one. This method is very simple and fast, but it has an error of up to 2 minutes per interval.
0 Comments
Answers (0)
See Also
Categories
Find more on Graphics Object Programming 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!