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
902 Solvers
First non-zero element in each column
601 Solvers
Convert a numerical matrix into a cell array of strings
469 Solvers
Sum of diagonal of a square matrix
1331 Solvers
312 Solvers
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!