필터 지우기
필터 지우기

Find out the mean of each year and month from temperature data of 1890-2018

조회 수: 2 (최근 30일)
How can I find out the mean of the temperature of each year if I have a big dataset 1890-2018. I would also like to separate the data in to 12 months for all the year to see the seasonal variation. The year of the data has already shown as the Matlab time. I do not know how the select the data of each year to find the mean.
  댓글 수: 1
Stephan
Stephan 2018년 5월 1일
Hi,
have a look at the ymd-function:
[y,m,d] = ymd(t)
It gives you the datetime as numerical values you can calculate with. This should be the right direction ;-)
Best Regards
Stephan

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

채택된 답변

Steven Lord
Steven Lord 2018년 5월 1일
If you have your data stored in a timetable, use the retime function. Use the "Aggregate Timetable Data and Calculate Mean Values" example on the retime documentation page as a model, changing how it aggregates the data from 'hourly' to 'monthly' or 'yearly'.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Timetables에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by