Cody

Solution 1461537

Submitted on 12 Mar 2018 by J. S. Kowontan
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:6]'; n = 3; y_correct = [1 NaN NaN NaN 2 1 NaN NaN 3 2 1 NaN 4 3 2 1 5 4 3 2 6 5 4 3]; assert(isequalwithequalnans(goNtimes(x,n),y_correct))

2   Pass
x = [17;23;4;10;11]; n = 4; y_correct = [17 NaN NaN NaN NaN 23 17 NaN NaN NaN 4 23 17 NaN NaN 10 4 23 17 NaN 11 10 4 23 17]; assert(isequalwithequalnans(goNtimes(x,n),y_correct))

[Warning: First element of input column does not match first element of input row. Column wins diagonal conflict.]

3   Pass
x = [35;3;31;8;30;4]; n = 1; y_correct = [35 NaN 3 35 31 3 8 31 30 8 4 30]; assert(isequalwithequalnans(goNtimes(x,n),y_correct))

[Warning: First element of input column does not match first element of input row. Column wins diagonal conflict.]

4   Pass
x = [35;3;31;8;30;4]; n = 2; y_correct = [35 NaN NaN 3 35 NaN 31 3 35 8 31 3 30 8 31 4 30 8]; assert(isequalwithequalnans(goNtimes(x,n),y_correct))

[Warning: First element of input column does not match first element of input row. Column wins diagonal conflict.]

5   Pass
x = [30;38;46;5;13;21;22]; n = 4; y_correct = [30 NaN NaN NaN NaN 38 30 NaN NaN NaN 46 38 30 NaN NaN 5 46 38 30 NaN 13 5 46 38 30 21 13 5 46 38 22 21 13 5 46]; assert(isequalwithequalnans(goNtimes(x,n),y_correct))

[Warning: First element of input column does not match first element of input row. Column wins diagonal conflict.]