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 Solvers26
Suggested Problems
-
Back to basics 3 - Temp Directory
387 Solvers
-
Find the largest value in the 3D matrix
1683 Solvers
-
Get the length of a given vector
13604 Solvers
-
Change the sign of even index entries of the reversed vector
660 Solvers
-
Calculate the height of an object dropped from the sky
324 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.