Given a vector, return a new vector containing only the even numbers in their original order. Example: keep_evens([1 2 3 4 5 6]) returns [2 4 6]
Solution Stats
Problem Comments
1 Comment
Solution Comments
Show comments
Loading...
Problem Recent Solvers6
Suggested Problems
-
6 Solvers
More from this Author9
Problem Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
In test 2, it would be better to use isempty() than isequal(..., []).