I would appreciate your help on this. I have a dataset of daily counts of temperature (please find attached) for 11 years, 2006-2016.
What I want to do is to find all time periods that demonstrate three or more consecutive days with temperature higher than the 95th percentile (this way I am trying to locate heat waves). I also need the respective dates.
What I have tried so far
for i = 1: length(Daily_Meteo.Daily_T)
if Daily_Meteo.Daily_T(i)> 28
days = days + 1;
if days >= 3;
HWs(m,:) = Daily_Data.Daily_DATE(i);
The problem is that HWs(m,:) holds all days with T>28oC, but I want only 3 or more consecutive days...
Thank you in advance!
PS. I am on R2019b.