Cody

# Problem 11. Back and Forth Rows

Solution 886011

Submitted on 4 May 2016 by tr4nshum4n
This solution is locked. To view this solution, you need to provide a solution of the same size or smaller.

### Test Suite

Test Status Code Input and Output
1   Pass
n = 5; a = [ 1 2 3 4 5; 10 9 8 7 6; 11 12 13 14 15; 20 19 18 17 16; 21 22 23 24 25]; assert(isequal(a,back_and_forth(n)));

seq = Columns 1 through 16 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 Columns 17 through 25 17 18 19 20 21 22 23 24 25 b = 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 b = 1 2 3 4 5 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 seq = Columns 1 through 16 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 Columns 17 through 20 22 23 24 25 b = 1 2 3 4 5 10 9 8 7 6 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 seq = 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 b = 1 2 3 4 5 10 9 8 7 6 11 12 13 14 15 0 0 0 0 0 0 0 0 0 0 seq = 16 17 18 19 20 21 22 23 24 25 b = 1 2 3 4 5 10 9 8 7 6 11 12 13 14 15 20 19 18 17 16 0 0 0 0 0 seq = 21 22 23 24 25 b = 1 2 3 4 5 10 9 8 7 6 11 12 13 14 15 20 19 18 17 16 21 22 23 24 25 seq = Empty matrix: 1-by-0

### Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!