how to sum data every year
조회 수: 6 (최근 30일)
이전 댓글 표시
hello
i have a 11322x6 double. i have the date in the first column, months and days in the third and the forth. on the fivth and the sixth colum i have the variables. temperature and degre days that i calculeted from temperature. now i need to sum every degre day of every year together , the problem years change the number evey 4 years so how to do it with a function or easy loop. i saw a lot of them on matlab but don't kenw how to use it
nd i don't knew to apply it on my case
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/269587/image.png)
댓글 수: 0
채택된 답변
Adam Danz
2020년 2월 3일
편집: Adam Danz
2020년 2월 6일
No loop needed.
to compute the mean of each group where data is the temperature column.
If your data contain missing values, you can use mu = splitapply(@(x), mean(data,'omitnan'), groups).
Let us know if you get stuck.
댓글 수: 2
추가 답변 (1개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Oceanography and Hydrology에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!