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 CenterFile Exchange에서 Timetables에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by