Test | Status | Code Input and Output |
---|---|---|
1 | Pass |
%%
n = 2;
y_correct = [0 1;1 0];
assert(isequal(anti_eye(n),y_correct))
ans =
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))
ans =
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
ans =
0 0 0 1
0 0 1 0
0 1 0 0
1 0 0 0
|
Determine whether a vector is monotonically increasing
11924 Solvers
Given an unsigned integer x, find the largest y by rearranging the bits in x
780 Solvers
Who knows the last digit of pi?
557 Solvers
Output any real number that is neither positive nor negative
316 Solvers
530 Solvers
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!