A similar one is here.
http://www.mathworks.com/matlabcentral/cody/problems/40-reverse-run-length-encoder
You didn't restrict yourself to using only 0-9 in your sequence, though.
Same as Problem 55 Counting Sequence.
The best solution without regexprep.
Remove any row in which a NaN appears
6828 Solvers
309 Solvers
858 Solvers
Unique values without using UNIQUE function
171 Solvers
260 Solvers
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!