How do you do a moving average in Matlab?
M = movmean( A , k ) returns an array of local k -point mean values, where each mean is calculated over a sliding window of length k across neighboring elements of A . When k is odd, the window is centered about the element in the current position.