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.
Reverse the Words (not letters) of a String
299 Solvers
96 Solvers
Make a random, non-repeating vector.
3320 Solvers
We love vectorized solutions. Problem 1 : remove the row average.
571 Solvers
Generate a string like abbcccddddeeeee
239 Solvers
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!