Test | Status | Code Input and Output |
---|---|---|
1 | Pass |
%%
n = 2;
y_correct = [0 1;1 0];
assert(isequal(anti_eye(n),y_correct))
|
2 | Pass |
%%
n = 3;
y_correct = [0 0 1;0 1 0; 1 0 0];
assert(isequal(anti_eye(n),y_correct))
|
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
|
Which values occur exactly three times?
3817 Solvers
Is this triangle right-angled?
2395 Solvers
1097 Solvers
274 Solvers
Replace every 3rd element in a vector with 4
170 Solvers
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!