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
5869 Solvers
1344 Solvers
Arrange vector in ascending order
626 Solvers
Find the index of the largest value in any vector X=[4,3,4,5,9,12,0,4.....5]
301 Solvers
319 Solvers
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!