Problem 56210. Find the moving-average of the elements of a vector
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
Rafael S.T. Vieira
on 8 Nov 2022
FYI: That's not the definition of moving average, but cool.
Solution Comments
Show commentsProblem Recent Solvers22
Suggested Problems
-
Return the largest number that is adjacent to a zero
5409 Solvers
-
2636 Solvers
-
Convert a numerical matrix into a cell array of strings
2070 Solvers
-
Find out missing number from a vector of 9 elements
302 Solvers
-
647 Solvers
Problem Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!