Is it not permitted by using tabulate function to solve it?
Good job with the solution. You must have given it a lot of thinking !!!
A..h... cheater !!!
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!