nice (and difficult) problem! (if possible, please fix the testsuite adding something along the lines of "assert(n==numel(unique(c)))")
example of invalid solution
Read a column of numbers and interpolate missing data
1235 Solvers
1366 Solvers
Test if a Number is a Palindrome without using any String Operations
181 Solvers
middleAsColumn: Return all but first and last element as a column vector
387 Solvers
Create Circular Perfect Square Sequence
9 Solvers
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!