필터 지우기
필터 지우기

Calculating hourly average over several days using retime

조회 수: 3 (최근 30일)
Nao
Nao 2022년 11월 12일
답변: Image Analyst 2022년 11월 12일
Hello.
I have a temperature data over the course of 2 weeks, at a sampling rate of 1 sec. I want to calculate the hourly average so that I can see a tendency in temperature change within the day.
I have tried this so far:
TT = array2timetable(TempC,"RowTimes",T);
Hour = retime(TT,"hourly","mean");
but this gives me the outcome of average temperature of the hour of one day, such as:
'2022/06/18 11:00:00' 32.2
'2022/06/18 12:00:00' 31.7
'2022/06/18 13:00:00' 30.8
'2022/06/18 14:00:00' 31.4
My ideal outcome is hourly average of 2 weeks combined. For example, I want the calculations to take average of the temperature at 12pm on June 18, 19, 20,..., so that the final result will show something like 12pm 30℃, 1pm 32℃,...
How should I do this? Thank you in advance!

답변 (1개)

Image Analyst
Image Analyst 2022년 11월 12일

카테고리

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