MATLAB: Create a moving average

moving average

Hi There, How can I calculate a moving average for a column of data. For instance i want to average the 50 points either side of each data point in my column. Thanks

Best Answer

A - your data
L = filter(ones(101,1)/101,1,[A(:) zeros(50,1)]);
out = L(51:end);
Related Question