Sort Matlab table, monthly and seasonally. plot mean and trend seasonal map

Gurumoorthi K on 23 May 2023
Latest activity Reply by Gurumoorthi K on 30 May 2023

I am processing ocean and climate data (1982-2022). Here, I have table which having heatwaves events details. Now, I want to sort the data month wise and also seasonal wise (summer:October- February, and winter:March-September), and then i wanted to plot mean seasonal and trend.
Sample file is attached. length of original file may vary in size.
Thanks in addvance.
Jiro Doke
Jiro Doke on 29 May 2023
Gurumoorthi K
Gurumoorthi K on 29 May 2023
Yes, I can understand the code now, but not sorted out my problem.
load table_1.mat
MHW3.mhw_onset = datetime(MHW3.mhw_onset,"ConvertFrom","yyyymmdd");
MHW3.mhw_end = datetime(MHW3.mhw_end,"ConvertFrom","yyyymmdd")
Here after, I need to extract only the summer (October- February), and winter (March-September).
So, now I am searching code for this. Its great if you could share code.
Jiro Doke
Jiro Doke on 29 May 2023
Does this work?
load table_1.mat
MHW3.mhw_onset = datetime(MHW3.mhw_onset,"ConvertFrom","yyyymmdd");
MHW3.mhw_end = datetime(MHW3.mhw_end,"ConvertFrom","yyyymmdd");
% extract summer data
MHW3_summer = MHW3(month(MHW3.mhw_onset)>=10 | month(MHW3.mhw_onset)<=2,:);
% extract winter data
MHW3_winter = MHW3(month(MHW3.mhw_onset)>=3 & month(MHW3.mhw_onset)<=9,:);
Gurumoorthi K
Gurumoorthi K on 30 May 2023
Its works. My problem solved now. Also, I realised where i did mistake. Thanks you so much.