Problem 1229. Determine the number of odd integers in a vector
Determine the number of unique odd integers in a vector.
Examples:
Input x = [2 5 8 3 7 1]; Output y = 4;
Input x = [2 5 9]; Output y = 2;
Solution Stats
Problem Comments
-
1 Comment
coconutMocha
on 22 Jan 2017
The code check does not mandate that you find the number of *unique* odd integers, just the absolute number of odd integers. This is a source of confusion and inflated size!
Solution Comments
Show commentsProblem Recent Solvers731
Suggested Problems
-
The Hitchhiker's Guide to MATLAB
3296 Solvers
-
Back to basics 22 - Rotate a matrix
903 Solvers
-
Number of 1s in a binary string
9083 Solvers
-
Convert a vector into a number
599 Solvers
-
The sum of the numbers in the vector
597 Solvers
More from this Author7
Problem Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!