Cody

# Problem 43304. Find sum of negative elements in row.

Solution 1818755

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 = [1 -5 3 4 -6 6 7 8 9 10]; y_correct = -11; assert(isequal(your_fcn_name(x),y_correct))

x = 0 -5 3 4 -6 6 7 8 9 10 y = 36 y = 36 x = 0 -5 0 4 -6 6 7 8 9 10 y = 33 x = 0 -5 0 0 -6 6 7 8 9 10 y = 29 y = 29 x = 0 -5 0 0 -6 0 7 8 9 10 y = 23 x = 0 -5 0 0 -6 0 0 8 9 10 y = 16 x = 0 -5 0 0 -6 0 0 0 9 10 y = 8 x = 0 -5 0 0 -6 0 0 0 0 10 y = -1 x = 0 -5 0 0 -6 0 0 0 0 0 y = -11

2   Pass
x=[ 5 0 5 -2 5 -4 5 -6 5 -8 5 -10 5 -12 5 -14 5 -16 5 -18 5 -20]; y_correct = -110; assert(isequal(your_fcn_name(x),y_correct))

x = 0 0 5 -2 5 -4 5 -6 5 -8 5 -10 5 -12 5 -14 5 -16 5 -18 5 -20 y = -60 y = -60 x = 0 0 0 -2 5 -4 5 -6 5 -8 5 -10 5 -12 5 -14 5 -16 5 -18 5 -20 y = -65 y = -65 x = 0 0 0 -2 0 -4 5 -6 5 -8 5 -10 5 -12 5 -14 5 -16 5 -18 5 -20 y = -70 y = -70 x = 0 0 0 -2 0 -4 0 -6 5 -8 5 -10 5 -12 5 -14 5 -16 5 -18 5 -20 y = -75 y = -75 x = 0 0 0 -2 0 -4 0 -6 0 -8 5 -10 5 -12 5 -14 5 -16 5 -18 5 -20 y = -80 y = -80 x = 0 0 0 -2 0 -4 0 -6 0 -8 0 -10 5 -12 5 -14 5 -16 5 -18 5 -20 y = -85 y = -85 x = 0 0 0 -2 0 -4 0 -6 0 -8 0 -10 0 -12 5 -14 5 -16 5 -18 5 -20 y = -90 y = -90 x = 0 0 0 -2 0 -4 0 -6 0 -8 0 -10 0 -12 0 -14 5 -16 5 -18 5 -20 y = -95 y = -95 x = 0 0 0 -2 0 -4 0 -6 0 -8 0 -10 0 -12 0 -14 0 -16 5 -18 5 -20 y = -100 y = -100 x = 0 0 0 -2 0 -4 0 -6 0 -8 0 -10 0 -12 0 -14 0 -16 0 -18 5 -20 y = -105 y = -105 x = 0 0 0 -2 0 -4 0 -6 0 -8 0 -10 0 -12 0 -14 0 -16 0 -18 0 -20 y = -110 y = -110