MATLAB: Sequence of date with no leap year

datesleap daynoleapdaysequence of dates

Hello all, I am analyzing climate data from a model that does not consider leap day. Is there a way to generate sequence of dates without considering the leap day? i generate the dates that i am interested, however, i do not know how to remove the leap day out of it. Any help would be appreciated.
startDate = datetime(1986,01,01);
endDate = datetime(2005,12,31);
Time=(startDate:endDate)';

Best Answer

Add this line after you create your Time variable:
Time(month(Time)==2 & day(Time)==29) = []