This solution is outdated. To rescore this solution, sign in.
Test | Status | Code Input and Output |
---|---|---|
1 | Pass |
n = 3;
a_correct = [0 1 2;
1 2 1;
2 1 0];
assert(isequal(rainBowMatrix(n),a_correct))
|
2 | Pass |
n = 8;
a_correct = [0 1 2 3 4 5 6 7;
1 2 3 4 5 6 7 6;
2 3 4 5 6 7 6 5;
3 4 5 6 7 6 5 4;
4 5 6 7 6 5 4 3;
5 6 7 6 5 4 3 2;
6 7 6 5 4 3 2 1;
7 6 5 4 3 2 1 0];
assert(isequal(rainBowMatrix(n),a_correct))
|
2933 Solvers
57 Solvers
284 Solvers
Calculate the derivative of a polynomial
139 Solvers
171 Solvers