필터 지우기
필터 지우기

how to remove a particular season values from monthly time series?

조회 수: 3 (최근 30일)
Aarti Soni
Aarti Soni 2023년 9월 27일
댓글: Dyuman Joshi 2023년 9월 27일
Hello everyone,
I have monthly temperature data for 20years (360x720x240) where 360x720 is latitude x longitude. From this monthly time series, I want to remove the winter season (December, January, Fabruary months), so the final outcome will be 360 x 720 x 180 (9month timeseries for 20 years)
How can remove these three months from every year?
Thanks.

채택된 답변

Dyuman Joshi
Dyuman Joshi 2023년 9월 27일
편집: Dyuman Joshi 2023년 9월 27일
Assuming the data is stored as a double array and the season data is month wise i.e Jan-Feb-...-Nov-Dec
y = rand(360,720,240);
size(y)
ans = 1×3
360 720 240
%Delete the values corresponding to winter months
y(:,:,[1:12:end 2:12:end 12:12:end])=[];
size(y)
ans = 1×3
360 720 180

추가 답변 (1개)

KSSV
KSSV 2023년 9월 27일
thedates = (datetime(2003,1,1):days(30):datetime(2023,12,31))' ;
idx = thedates.Month == 1 | thedates.Month == 2 | thedates.Month == 12 ;
iwant = thedates(~idx) ;

카테고리

Help CenterFile Exchange에서 Correlation and Convolution에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by