Cody

Solution 280304

Submitted on 13 Jul 2013 by Matthew
This solution is locked. To view this solution, you need to provide a solution of the same size or smaller.

This solution is outdated. To rescore this solution, sign in.

Test Suite

Test Status Code Input and Output
1   Pass
%% n = 5; a = [1 0 1 0 1; 0 1 0 1 0; 1 0 1 0 1; 0 1 0 1 0; 1 0 1 0 1]; assert(isequal(a,checkerboard(n)))

ans = 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1

2   Pass
%% n = 4; a = [1 0 1 0; 0 1 0 1; 1 0 1 0; 0 1 0 1]; assert(isequal(a,checkerboard(n)))

[Warning: Size input contains non-integer values. This will error in a future release. Use FLOOR to convert to integer values.] [> In repmat at 90 In checkerboard at 2 In verifyCode>evaluateCode at 227 In verifyCode at 40 In fevalJSON at 14] [Warning: Size input contains non-integer values. This will error in a future release. Use FLOOR to convert to integer values.] [> In repmat at 91 In checkerboard at 2 In verifyCode>evaluateCode at 227 In verifyCode at 40 In fevalJSON at 14] ans = 1 0 1 0 0 1 0 1 1 0 1 0 0 1 0 1