MATLAB: How to compute 3 minute moving average in timeseries

moving meanmovingaveragemovmeantimeseries

I have a time series object with two columns : Date,time (dd-mm-yyyy HH:MM:SS format) and Value. The data is sampled every 2 seconds. The total data is available is for around 10 days. How do I compute a timeseries with 3-minute moving average values?

Best Answer

3 minutes at every 2 seconds would be about 91 elements, so use movmean():
movingAverageSignal = movmean(signal, 91);