Cody

Solution 1815953

Submitted on 15 May 2019
This solution is locked. To view this solution, you need to provide a solution of the same size or smaller.

Test Suite

Test Status Code Input and Output
1   Fail
x = [9 7 10; 10 1 10; 2 3 2; 10 6 10]; y_correct = 80; assert(isequal(sum_array(x),y_correct))

y = 9 y = 16 y = 26

Index in position 2 exceeds array bounds (must not exceed 3). Error in sum_array (line 5) y = x(i, l) + y Error in Test1 (line 6) assert(isequal(sum_array(x),y_correct))

2   Pass
x = [4 8 7 2 9; 6 9 8 3 6; 7 6 5 5 8; 5 4 1 6 7; 9 2 3 5 5]; y_correct = 140; assert(isequal(sum_array(x),y_correct))

y = 4 y = 12 y = 19 y = 21 y = 30 y = 36 y = 45 y = 53 y = 56 y = 62 y = 69 y = 75 y = 80 y = 85 y = 93 y = 98 y = 102 y = 103 y = 109 y = 116 y = 125 y = 127 y = 130 y = 135 y = 140