How do I change these daily time series data to monthly?

2 ビュー (過去 30 日間)
Abubakar Sani-Mohammed
Abubakar Sani-Mohammed 2019 年 1 月 22 日
Hello, I have a daily time series data in an array of 81(rows) by 4748 (columns), the 81 rows represents the points at which the data (in their respective corresponding column) was measured (daily). Then I have another arrey of the Time, which is 4748 by 1 (a column matrix) consisting the dates, from January 1, 2005. I need guidance on how to turn these daily time series into monthly. Thank you.

採用された回答

Walter Roberson
Walter Roberson 2019 年 1 月 22 日
Convert to timetable() objects and use retime()
  11 件のコメント
Walter Roberson
Walter Roberson 2019 年 1 月 27 日
dv = datevec(datenum('2005/01/01 12:00'):datenum('2017/12/31 12:00'));
monthnum = dv(:,1)*12 + dv(:,2);
relmonth = monthnum - monthnum(1) + 1;
nummonth = relmonth(end);
numpoints = size(duVq_hydl,1);
summarized = zeros(numpoints, nummonth);
for pointnum = 1 : numpoints
summarized(pointnum, :) = accumarray( relmonth, duVq_hydl(pointnum, :).', [], @mean );
end
summary_dates = datenum(2005, 1:nummonth, 1);
This is 156 months, not 157 months.
You were not clear as to what date format you wanted the summary dates to be, so I used serial date numbers.
Abubakar Sani-Mohammed
Abubakar Sani-Mohammed 2019 年 1 月 28 日
Thank you very much, I will work around it. I really appreciate your time and effort.

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeCalendar についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by