Matlab, for loop code

조회 수: 1 (최근 30일)
assaye gedifew
assaye gedifew 2022년 3월 17일
답변: Cris LaPierre 2022년 3월 17일
I have a series data of hourly and daily climate data of over 10yrs. And what i want to plot them into a graph of mean monthly and in yearly. Can you tell me how to do it in MATLAB? Thank you very much!
  댓글 수: 1
Arif Hoq
Arif Hoq 2022년 3월 17일
attach your data. if possible please try to show your expected result. atleast 2/3 lines

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

답변 (1개)

Cris LaPierre
Cris LaPierre 2022년 3월 17일
I don't know much about your data, but I would see if groupsummary works. If you have datetime info in your data, you can use the 'groupbin' input to specify a way to automatically group your data ('month' or 'year') and then apply method(s) to each group (e.g. 'mean').
Once you have the summarized data, you can just plot it. See Ch 9 of MATLAB Onramp.
I find this workflow easiest when the data is stored in Tables. See this page on how to access data in tables.

카테고리

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

태그

Community Treasure Hunt

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

Start Hunting!

Translated by