Problem 57540. Repeatitive Summation
Solution Stats
Problem Comments
-
2 Comments
I am very confused by your explanation. b will be integers in the range [1, numel(x)], doesn't the second example violate this (where b has -2 and 0 as members)? I still don't see how you are getting your output with the explanation provided.
There was some mishap in that example, David. b was supposed to be a (and vice-versa), as you pointed out the violation.
It has been cleared out. I hope the question is clear now.
Solution Comments
Show commentsProblem Recent Solvers7
Suggested Problems
-
Project Euler: Problem 6, Natural numbers, squares and sums.
2347 Solvers
-
Duplicate each element of a vector.
619 Solvers
-
Magic is simple (for beginners)
10177 Solvers
-
629 Solvers
-
Find the index of the largest value in any vector X=[4,3,4,5,9,12,0,4.....5]
384 Solvers
More from this Author31
Problem Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!