Cody

Problem 45484. Finding sum of even numbers in a vector.

Solution 2246212

Submitted on 30 Apr 2020 by Yuan
  • Size: 15
  • This is the leading solution.
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 4 3 8]; y_correct = 12; assert(isequal(your_fcn_name(x),y_correct))

ans = 12

2   Pass
x = [78 1 7]; y_correct = 78; assert(isequal(your_fcn_name(x),y_correct))

ans = 78

Suggested Problems

Community Treasure Hunt

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

Start Hunting!