Test | Status | Code Input and Output |
---|---|---|
1 | Pass |
%%
n = 2;
y_correct = [0 1;1 0];
assert(isequal(anti_eye(n),y_correct))
A =
0 1
1 0
|
2 | Pass |
%%
n = 3;
y_correct = [0 0 1;0 1 0; 1 0 0];
assert(isequal(anti_eye(n),y_correct))
A =
0 0 1
0 1 0
1 0 0
|
3 | Pass |
%%
n = 4;
y_correct = [0 0 0 1;0 0 1 0;0 1 0 0;1 0 0 0]
assert(isequal(anti_eye(n),y_correct))
y_correct =
0 0 0 1
0 0 1 0
0 1 0 0
1 0 0 0
A =
0 0 0 1
0 0 1 0
0 1 0 0
1 0 0 0
|
17477 Solvers
Increment a number, given its digits
562 Solvers
253 Solvers
309 Solvers
Find the area of a rectangle if length of the diagonal is given.
130 Solvers
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!