Problem 44639. Calculate mean value of any pair in a vector.
Given a vector A, calculate the mean of 2 number in the vector one by one. example: input: A=[1, 5, 6, 8, 9, 15] output: B=[3, 5.5, 7, 8.5, 12]
example: input: A=[4 5 21 6 2 1 6 63] output: B=[4.5, 13, 13.5, 4, 1.5, 3.5, 34.5]
Solution Stats
Problem Comments
Solution Comments
Show commentsProblem Recent Solvers55
Suggested Problems
-
"Low : High - Low : High - Turn around " -- Create a subindices vector
534 Solvers
-
Who is the smartest MATLAB programmer?
748 Solvers
-
Create matrix of replicated elements
377 Solvers
-
4545 Solvers
-
Matrix of almost all zeros, except for main diagonal
181 Solvers
More from this Author18
Problem Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!