MATLAB: Moving average

moving average

Greetings,
I have a 3000×1 matrix and I want make it 30×1 matrix by taking average from each 100 values. Is there any simple command or way to do that.
Your help is highly appreciated.
Thanks and regards Shafi

Best Answer

x = mean(reshape(y,[],30)).' %y is 3000 x 1