Filter löschen
Filter löschen

how aggregate duraration and sum it in timetable

2 Ansichten (letzte 30 Tage)
Luca Re
Luca Re am 27 Mai 2024
Bearbeitet: the cyclist am 27 Mai 2024
Hi,
it's a timetable and i want to sum all duration equal:
example:
04/01/2010 2202 1.23
05/01/2010 2202 1.26
......
i want this:
duration value
22:02 2.49 (1.23+1.26)

Akzeptierte Antwort

the cyclist
the cyclist am 27 Mai 2024
Bearbeitet: the cyclist am 27 Mai 2024
Here is one way:
load("matlab_tt2")
TT2.timeOfDay = timeofday(TT2.datt);
equalDurationSum = groupsummary(TT2,"timeOfDay","sum")
equalDurationSum = 657x3 table
timeOfDay GroupCount sum_close1 _________ __________ __________ 00:01:00 3 3542 00:02:00 3 3542.2 00:03:00 2 2370.8 00:04:00 3 3542 00:05:00 2 2357.5 00:06:00 2 2357.5 00:07:00 2 2357.8 00:08:00 2 2370.8 00:09:00 2 2357.5 00:10:00 2 2357.2 00:11:00 3 3541.2 00:12:00 3 3541.5 00:13:00 2 2357.5 00:14:00 2 2357.8 00:15:00 3 3542 00:16:00 3 3542

Weitere Antworten (0)

Kategorien

Mehr zu Timetables finden Sie in Help Center und File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by