how aggregate duraration and sum it in timetable

2 ビュー (過去 30 日間)
Luca Re
Luca Re 2024 年 5 月 27 日
編集済み: the cyclist 2024 年 5 月 27 日
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)

採用された回答

the cyclist
the cyclist 2024 年 5 月 27 日
編集済み: the cyclist 2024 年 5 月 27 日
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

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeTimetables についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by