my solution is actually wrong.but TestSuite didn't add a "n=7" case,so...
Test | Status | Code Input and Output |
---|---|---|
1 | Pass |
%%
n = 5;
a = [0 0 0 0 0;
0 69 69 69 0;
0 69 0 69 0;
0 69 69 69 0;
0 0 0 0 0];
assert(isequal(bullseye3(n),a));
|
2 | Pass |
%%
n = 9;
a = [0 0 0 0 0 0 0 0 0;
0 69 69 69 69 69 69 69 0;
0 69 0 0 0 0 0 69 0;
0 69 0 69 69 69 0 69 0;
0 69 0 69 0 69 0 69 0;
0 69 0 69 69 69 0 69 0;
0 69 0 0 0 0 0 69 0;
0 69 69 69 69 69 69 69 0;
0 0 0 0 0 0 0 0 0;];
assert(isequal(bullseye3(n),a));
|
Find common elements in matrix rows
1231 Solvers
Given a matrix, return the last eigen value
175 Solvers
271 Solvers
511 Solvers
264 Solvers
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!