Change a half hourly table to hourly time table
2 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Fraser McMurray
le 5 Fév 2018
Commenté : Steven Lord
le 6 Fév 2018
I have a table which consists of 220 columns of half-hourly values over the course of a year. Is there a way to change the table to hourly values which are the average across two of the half hourly values.
0 commentaires
Réponse acceptée
Walter Roberson
le 5 Fév 2018
3 commentaires
Peter Perkins
le 6 Fév 2018
Assuming you have R2016b or later, use table2timetable to create a timetable first, then call retime, using 'hourly'.
Pre-R2016b, you can create a new variable in your table that is your timestamps rounded down to the previous hour (use dateshift), then use varfun and group by that new variable to compute the mean of all the data variables.
Steven Lord
le 6 Fév 2018
Plus de réponses (0)
Voir également
Catégories
En savoir plus sur Tables dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!