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)))
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
|
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)))
a =
1 0 1 0
0 1 0 1
1 0 1 0
0 1 0 1
|
3 | Pass |
n = 7;
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 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)))
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 0 1 0
1 0 1 0 1 0 1
0 1 0 1 0 1 0
1 0 1 0 1 0 1
|
Omit columns averages from a matrix
527 Solvers
284 Solvers
Right Triangle Side Lengths (Inspired by Project Euler Problem 39)
511 Solvers
Check that number is whole number
1070 Solvers
Find my daddy long leg (No 's')
632 Solvers
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!