This solution is outdated. To rescore this solution, sign in.
Test | Status | Code Input and Output |
---|---|---|
1 | Pass |
%%
x = eye(9);
y = [1 0 0 0 0 0 0
0 1 0 0 0 0 0
0 0 1 0 0 0 0
0 0 0 1 0 0 0
0 0 0 0 1 0 0
0 0 0 0 0 1 0
0 0 0 0 0 0 1];
assert(isequal(external_frame(x),y))
ans =
1 0 0 0 0 0 0
0 1 0 0 0 0 0
0 0 1 0 0 0 0
0 0 0 1 0 0 0
0 0 0 0 1 0 0
0 0 0 0 0 1 0
0 0 0 0 0 0 1
|
2 | Pass |
%%
x = magic(7);
y = [47 7 9 18 27
6 8 17 26 35
14 16 25 34 36
15 24 33 42 44
23 32 41 43 3];
assert(isequal(external_frame(x),y))
ans =
47 7 9 18 27
6 8 17 26 35
14 16 25 34 36
15 24 33 42 44
23 32 41 43 3
|
Make the vector [1 2 3 4 5 6 7 8 9 10]
29374 Solvers
367 Solvers
299 Solvers
Create an n-by-n null matrix and fill with ones certain positions
140 Solvers
2988 Solvers