Cody

Problem 299. vectorization in N

Solution 3043192

Submitted on 3 Oct 2020 by Klap Hest
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 = 11; y_correct = 16; assert(isequal(sums(x),y_correct))

s = 1 s = 3 s = 4 s = 6 s = 7 s = 9 s = 10 s = 12 s = 13 s = 15 s = 16

2   Pass
x = 50; y_correct = 75; assert(isequal(sums(x),y_correct))

s = 1 s = 3 s = 4 s = 6 s = 7 s = 9 s = 10 s = 12 s = 13 s = 15 s = 16 s = 18 s = 19 s = 21 s = 22 s = 24 s = 25 s = 27 s = 28 s = 30 s = 31 s = 33 s = 34 s = 36 s = 37 s = 39 s = 40 s = 42 s = 43 s = 45 s = 46 s = 48 s = 49 s = 51 s = 52 s = 54 s = 55 s = 57 s = 58 s = 60 s = 61 s = 63 s = 64 s = 66 s = 67 s = 69 s = 70 s = 72 s = 73 s = 75

Suggested Problems

More from this Author10

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!