First count the number of odd numbers in x, then the number of even. Return their product.
example:
x = [1 2]
One odd and one even. The product is thus 1.
Solution Stats
Solution Comments
Show comments
Loading...
Problem Recent Solvers68
Suggested Problems
-
Select every other element of a vector
36266 Solvers
-
Project Euler: Problem 6, Natural numbers, squares and sums.
2538 Solvers
-
Sum the numbers on the main diagonal
613 Solvers
-
The sum of the numbers in the vector
642 Solvers
-
358 Solvers
More from this Author25
Problem Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!