Please add more cases to the test suite, or else it is trivial to solve this problem.
Rafael is right and since you made this into a badge problem it is even more essential to fix this
Generate a vector like 1,2,2,3,3,3,4,4,4,4
3627 Solvers
Reverse the elements of an array
687 Solvers
Matlab Basics - Logical Tests I
195 Solvers
260 Solvers
Find the Oldest Person in a Room
5138 Solvers
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!