How do I get the average of data that are divided into different time intervals?
이전 댓글 표시
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.
채택된 답변
추가 답변 (0개)
카테고리
도움말 센터 및 File Exchange에서 Time Series Objects에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!