Calculate duration from labeled timestamped data.
Show older comments
Hi,
I have a timetable with timestamps and labels of different activities. The stacked plot looks like this.

I would like to calculate the durations of each cycle of the activity. For example, the top plot has 11 "Dump" sequences, so the outcome should be,
Dump = [t1, t2, ........t11], t = duration of each dump instance.
Is there any smarter way to accomplish this without using FOR loop and tracking changes in each row?
I am also attaching the .mat file of the timetable.
Thank you!
2 Comments
Akira Agata
on 11 Jun 2020
If possible, could you upload your timetable data so that people here can try their idea?
Khandakar Rashid
on 11 Jun 2020
Accepted Answer
More Answers (0)
Categories
Find more on Tables 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!