Borrar filtros
Borrar filtros

Calculating hourly average over several days using retime

3 visualizaciones (últimos 30 días)
Nao
Nao el 12 de Nov. de 2022
Respondida: Image Analyst el 12 de Nov. de 2022
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!

Respuestas (1)

Image Analyst
Image Analyst el 12 de Nov. de 2022

Categorías

Más información sobre Timetables en Help Center y File Exchange.

Productos

Community Treasure Hunt

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

Start Hunting!

Translated by