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
Back to basics 21 - Matrix replicating
1052 Solvers
Getting the indices from a vector
3206 Solvers
450 Solvers
What is Sum Of all elements of Matrix
292 Solvers
199 Solvers
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!