Cody

Solution 1253522

Submitted on 18 Aug 2017 by Chris Cleveland
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
x = 1; n=1; y_correct = 1; assert(isequal(stop_zig(x,n),y_correct))

h = 1

2   Pass
x =[1 2 3; 4 5 6; 7 8 9]; n=3; y_correct = [ 1 2 4 7 5 3]; assert(isequal(stop_zig(x,n),y_correct))

h = 1 2 3 2 3 4 3 4 5

3   Pass
x =[1 2 3; 4 5 6; 7 8 9]; n=-3; y_correct = [ 9 8 6 3 5 7]; assert(isequal(stop_zig(x,n),y_correct))

h = 1 2 3 2 3 4 3 4 5

4   Pass
x =[1 2 3; 4 5 6; 7 8 9]; n=2; y_correct = [ 1 2 4]; assert(isequal(stop_zig(x,n),y_correct))

h = 1 2 3 2 3 4 3 4 5

5   Pass
x =[1 2 3 4; 4 5 6 7; 7 8 9 10; 10 11 12 13]; n=-3; y_correct = [ 13 12 10 7 9 11]; assert(isequal(stop_zig(x,n),y_correct))

h = 1 2 3 4 2 3 4 5 3 4 5 6 4 5 6 7

More from this Author14