Surely I shouldn't done this ugly string thing, that is bad for everyone. Without any doubt, Tim's solution is the best one
Nice trick.
Return the 3n+1 sequence for n
6215 Solvers
middleAsColumn: Return all but first and last element as a column vector
393 Solvers
472 Solvers
371 Solvers
285 Solvers
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!