MATLAB: Using timetable to sort and apply functions to data with a timestep greater than one year

arraydataexcelMATLAB and Simulink Student Suitetabletimesteptimetable

I am working with daily temperature data; min, max, and mean over a period of 40 years. I have no problem using the timetable functionality to sort the data, by year, month,etc, however I want to compare the data for the lifetime and find the standard deviation and median. I know this is possible to do using arrays and for loops to sort and group the data, but because I have it set-up with timetables already I think it would be more elegant? Using the retime function I could change the timestep, but getting the appropriate data from that didn't work.
Thanks!

Best Answer

If you mean that instead of regular time steps, e.g., monthly, yearly, etc. You want to use a custom time-step, you can use the following signature of retime() function
TT2 = retime(TT1,'regular',method,'TimeStep',dt)
here dt can be defined using duration().