This solution is locked. To view this solution, you need to provide a solution of the same size or smaller.
This solution is outdated. To rescore this solution, sign in.
Test | Status | Code Input and Output |
---|---|---|
1 | Pass |
%%
A=[1 2 3; 4 5 6; 7 8 9];
n = 10;
B_correct =[1 2 10; 4 10 6; 10 8 9];
assert(isequal(sec_diag_replacement(A,n),B_correct))
ans =
3
A =
1 2 10
4 10 6
10 8 9
|
2 | Pass |
%%
A=1;
n = 10;
B_correct =10;
assert(isequal(sec_diag_replacement(A,n),B_correct))
ans =
1
A =
10
|
747 Solvers
340 Solvers
Make a random, non-repeating vector.
1120 Solvers
244 Solvers
204 Solvers