How do I get the average of data that are divided into different time intervals?
Afficher commentaires plus anciens
Hi, I´m working on a project where i have two sets of data: one has output data divided into time of output, and the other has input data divided into hourly figures. Example:
--------------------------------------------------------------------
% A=[year month day hour minute second data-output;...]
A = [ 2013 1 1 5 4 0 151; 2013 1 1 7 38 0 121; 2013 1 1 10 28 0 144; ...]
% B=[data-input year month day hour minute second;...]
B= [ 7.7 2013 1 1 0 0 0; 7.9 2013 1 1 1 0 0; 7.8 2013 1 1 2 0 0;...]
--------------------------------------------------------------------------
As you can see the time intervals don´t match and my goal is to get the average value of the "data-inputs" at every data-output. For example: I used (7.7+7.9+7.8...)/n to obtain 151 as an output. Does anyone know how? I'm pretty bad at explaining things so please ask if you didn't understand something.
1 commentaire
Fady
le 23 Août 2013
Réponse acceptée
Plus de réponses (0)
Catégories
En savoir plus sur Time Series Objects dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!