For an input array, add all the even values and subtract the odd values. This final value is the output.
E.g.
input = [1 2 3 4 5]
output = -3
Solution Stats
Problem Comments
Solution Comments
Show comments
Loading...
Problem Recent Solvers32
Suggested Problems
-
Find the numeric mean of the prime numbers in a matrix.
9175 Solvers
-
Make a random, non-repeating vector.
11821 Solvers
-
Given a matrix, swap the 2nd & 3rd columns
1285 Solvers
-
296 Solvers
-
2711 Solvers
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!