Cody

Solution 1818607

Submitted on 17 May 2019 by Dani Péter
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   Pass
x = magic(4); y_correct = [34;34;34;34] assert(isequal(sum_the_rows(x),y_correct))

y_correct = 34 34 34 34 a = 16 5 9 4 2 11 7 14 3 10 6 15 13 8 12 1

2   Pass
x = pascal(7); y_correct =[7;28;84;210;462;924;1716]; assert(isequal(sum_the_rows(x),y_correct))

a = 1 1 1 1 1 1 1 1 2 3 4 5 6 7 1 3 6 10 15 21 28 1 4 10 20 35 56 84 1 5 15 35 70 126 210 1 6 21 56 126 252 462 1 7 28 84 210 462 924

3   Pass
x = [5 -1 7 5;3 10 23 5;0 -3 7 5] y_correct =[16;41;9]; assert(isequal(sum_the_rows(x),y_correct))

x = 5 -1 7 5 3 10 23 5 0 -3 7 5 a = 5 3 0 -1 10 -3 7 23 7 5 5 5

Suggested Problems

More from this Author7