I want to compute the number of odd/even numbers in an array. But I want the results by two different functions.
Example:
x=1:10; assert(isequal(odd_fcn(x),5)) assert(isequal(even_fcn(x),5))
So you must solve this problem by writing 2 functions.
But you can only submit one function at the time.
Do you think it's possible?
HINT: I always test odd_fcn first. So odd_fcn must create the other function...
Solution Stats
Problem Comments
1 Comment
Solution Comments
Show comments
Loading...
Problem Recent Solvers23
Suggested Problems
-
Find the numeric mean of the prime numbers in a matrix.
9178 Solvers
-
Project Euler: Problem 6, Natural numbers, squares and sums.
2595 Solvers
-
Back to basics 2 - Function Path
185 Solvers
-
2045 Solvers
-
Find the index of the largest value in any vector X=[4,3,4,5,9,12,0,4.....5]
406 Solvers
More from this Author43
Problem Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
Tons of possibilities here is the thing I like the most about this problem.