Effacer les filtres
Effacer les filtres

Extract month values (rows) out of year matrix

2 vues (au cours des 30 derniers jours)
Luke McLellan
Luke McLellan le 27 Juil 2018
Rouvert : Walter Roberson le 22 Déc 2018
Hi there,
I have a matrix that contains 1 years worth of data (where the elements correspond to date x time) ranging from the 1st January to 31st December; each row represents 1 day of data. Is anyone aware of a method to average each column over each month? Any help would be appreciated.
Thanks
Luke

Réponses (1)

jonas
jonas le 27 Juil 2018
https://se.mathworks.com/matlabcentral/answers/317655-calculate-avergae-values-per-hour-day-month-and-year
I suggest using Sean de Wolski's answer with datetime and retime
  1 commentaire
Luke McLellan
Luke McLellan le 27 Juil 2018
Thanks. I have seen this before but could not get it working. I believe it is because I am dealing with data directly, meaning that each data point in the matrix is representative of a date and time. Whereas, the example is clearly split into Year Month ... format.

Connectez-vous pour commenter.

Catégories

En savoir plus sur Data Type Identification 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!

Translated by