Effacer les filtres
Effacer les filtres

Calculating hourly average over several days using retime

3 vues (au cours des 30 derniers jours)
Nao
Nao le 12 Nov 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!

Réponses (1)

Image Analyst
Image Analyst le 12 Nov 2022

Catégories

En savoir plus sur Timetables dans Help Center et File Exchange

Produits

Community Treasure Hunt

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

Start Hunting!

Translated by