Cody

Solution 1595904

Submitted on 30 Jul 2018 by bainhome
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))

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))

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))

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))

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))