This solution is outdated. To rescore this solution, sign in.
Elegant! I made a trivial modification tha reduced the size by 4 (Soluion 796772)
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))
|
2 | Pass |
%%
A=1;
n = 10;
B_correct =10;
assert(isequal(sec_diag_replacement(A,n),B_correct))
|
7667 Solvers
2472 Solvers
Calculate the area of a triangle between three points
278 Solvers
Generate a random matrix A of (1,-1)
161 Solvers
302 Solvers