Write a function that takes a vector x as input and returns the sum of all even numbers in x.
Input:
x = [1, 2, 3, 4, 5, 6]
Output:
y = 12

Solution Stats

35 Solutions

22 Solvers

Last Solution submitted on Sep 01, 2026

Last 200 Solutions

Solution Comments

Show comments
Loading...

Problem Recent Solvers22

Suggested Problems

More from this Author1

Problem Tags

Community Treasure Hunt

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

Start Hunting!