MATLAB: How to partition hourly Data by month

retimetimetable

Hi,i have 20-years hourly data converted into timetable,i need to retime my data to month running mean timetable and then substract my data from it. is it possible with retime function ? Otherwise, how to partition the data by month using reshape and taking into account leap and regular years ?
Thanks

Best Answer

Yes, you can calculate monthly mean of your timetable by retime function, like this. More details can be found in the help page of retime function .
outputTT = retime(yourTT,'monthly','mean')