"cat" is a really nice touch for concatenation of those arrays! your solutions never fail my expectation.
by the way, i saw that "sub-func" comment...:)
Calling the two sub-functions the right way will not hurt your score. Great work though. :)
Replace NaNs with the number that appears to its left in the row.
2056 Solvers
826 Solvers
381 Solvers
347 Solvers
2594 Solvers
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!