Example
Input vector: [1 2 3 4]
output vector: 1st element=1/1, 2nd element=(1+2)/2, 3rd element=(1+2+3)/3, 4th element=(1+2+3+4)/4.
That is, [1 1.5 2 2.5]
Solution Stats
Problem Comments
1 Comment
Solution Comments
Show comments
Loading...
Problem Recent Solvers25
Suggested Problems
-
Flip the main diagonal of a matrix
914 Solvers
-
Make a random, non-repeating vector.
11586 Solvers
-
We love vectorized solutions. Problem 1 : remove the row average.
892 Solvers
-
1738 Solvers
-
1712 Solvers
Problem Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
FYI: That's not the definition of moving average, but cool.