필터 지우기
필터 지우기

Summing parts of a column

조회 수: 2 (최근 30일)
Wendy Cameron
Wendy Cameron 2019년 2월 5일
답변: KSSV 2019년 2월 5일
I have 18 years of daily weather temperatures. I want to sum the temperatures for a specific part of the each year. How could I find the temperature sum for 1st September to 31st November for each year so I end up with a 2 by 18 table that shows the year in the first column and the summed temperature for 1st September to 31st November corresponding to each year in the second column.
Sample data attached.
Much appreciated, Wendy

답변 (1개)

KSSV
KSSV 2019년 2월 5일
YOu have multiple ways to do this.....
  1. Create the time stamps you want...find the respective indices using ismemebr and do the sum.
  2. Split the tdate vectors you have into respective months, years and pcik what you want and do the sum.

카테고리

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