MATLAB: How to calculate 30-min averages from 1-min data with gaps

30min averages

Hi everyone I have a dataset of about 2 years with 1min timestep, but there are gaps in the dates. Any idea how I can calculate the 30min averages? My dataset looks like this: date value 09/01/2015 00:03 2.5 09/01/2015 00:04 2.8 09/01/2015 00:11 3.1 09/01/2015 00:15 2.3 Thank you

Best Answer

If you're storing your data in a timetable, use the retime function as shown in the documentation.