Test | Status | Code Input and Output |
---|---|---|
1 | Pass |
%%
x = 1;
y_correct = 1;
assert(isequal(getArrayWithDiagOnes(x),y_correct))
yey =
1
|
2 | Pass |
%%
x = 2;
y_correct = [1,1;1,1];
assert(isequal(getArrayWithDiagOnes(x),y_correct))
yey =
1 0
0 1
|
3 | Pass |
%%
x = 5;
y_correct = [1 0 0 0 1;0 1 0 1 0;0 0 1 0 0;0 1 0 1 0;1 0 0 0 1];
assert(isequal(getArrayWithDiagOnes(x),y_correct))
yey =
1 0 0 0 0
0 1 0 0 0
0 0 1 0 0
0 0 0 1 0
0 0 0 0 1
|
Find the two most distant points
1628 Solvers
All your base are belong to us
463 Solvers
Project Euler: Problem 2, Sum of even Fibonacci
835 Solvers
584 Solvers
241 Solvers
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!