how to accumulate 10 minute values to daily values

조회 수: 1 (최근 30일)
Arthur Leon
Arthur Leon 2021년 3월 10일
댓글: Arthur Leon 2021년 3월 11일
I have found a piece of code which i adapted to get the accumulated daily values of actual Evapotranspiration (act_ET)
for a unknown reason i get a double array of the correct size lenght for act_ET and for act_ET_daily i only get one single value.
This alone would be ok, but the values of act_ET seem to be far to low.
Where is the mistake or is there even an easier way to get the cumulated daily value?
Looking forward to help from somebody.
Thanks in advance.
Best regards,
Arthur Leon
act_ET = table2array(T(: , 4));
% make daily values of act_ET
t = 0:numel(act_ET)-1 ; % time stamps
interval = 144 ;
ix = 1+floor((t-t(1))/interval);
act_ET_daily = accumarray(ix(:),act_ET(:));
  댓글 수: 2
Adam Danz
Adam Danz 2021년 3월 10일
> for act_ET_daily i only get one single value
After running the code with your data I get,
>> size(act_ET_daily )
ans =
101 1
>> size(act_ET)
ans =
14544 1
> the values of act_ET seem to be far to low
Those values are merely loaded into the workspace from your mat files so we have no idea where they come from.
>> min(act_ET), max(act_ET)
ans =
-0.0548
ans =
0.64635
Arthur Leon
Arthur Leon 2021년 3월 11일
i acutally found my error.
I called act_ET in a way that only the values for one speciific tme at a day were loaded.
Thanks for trying to solve my problem.

댓글을 달려면 로그인하십시오.

답변 (1개)

Seth Furman
Seth Furman 2021년 3월 11일

카테고리

Help CenterFile Exchange에서 Dates and Time에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by