This solution is locked. To view this solution, you need to provide a solution of the same size or smaller.
Test  Status  Code Input and Output 

1  Pass 
x = magic(6);
y_correct = 111;
assert(isequal(sum_of_sec_diag(x),y_correct))
a =
6
b =
6
sum =
24
sum =
47
sum =
69
sum =
102
sum =
107
sum =
111

2  Pass 
x = magic(10);
y_correct = 505;
assert(isequal(sum_of_sec_diag(x),y_correct))
a =
10
b =
10
sum =
40
sum =
104
sum =
167
sum =
229
sum =
290
sum =
380
sum =
469
sum =
482
sum =
494
sum =
505

3  Pass 
x = magic(11);
y_correct = 671;
assert(isequal(sum_of_sec_diag(x),y_correct))
a =
11
b =
11
sum =
66
sum =
131
sum =
195
sum =
258
sum =
320
sum =
381
sum =
441
sum =
500
sum =
558
sum =
615
sum =
671

4  Pass 
x=[1 2 3; 4 4 6; 2 8 9];
y_correct = 9;
assert(isequal(sum_of_sec_diag(x),y_correct))
a =
3
b =
3
sum =
3
sum =
7
sum =
9

Find the peak 3n+1 sequence value
818 Solvers
Sum all integers from 1 to 2^n
6549 Solvers
Duplicate each element of a vector.
461 Solvers
Matlab Basics  Absolute Value
277 Solvers
241 Solvers