I have a time series in a Nx1 array where N are the number of days (different for each dataset, but lets take days from 1951 till 2007). Leap years are included (1952, 1956, …). I am trying to convert the array into 366×57 (57 being the number of years between 1951-2007), by adding Nan at the Feb 29th (60th) position for non-leap years. I am sure there is a simple solution which I am having a hard time devising. Is there a way to accomplish this without loops.
MATLAB: Dealing with leap years, creating arrays of yearly data
leap years
Related Question
- Datevec with no leap year timeseries
- How to calculate formula using loop
- If else condition to determine if a year is a leap year
- Daily 3d array to monthly- dealing with alternate days in a month and leap years – How to do it
- Convert days to years month and days (leap year issue)
- Function for day of the year
Best Answer