Problem 367. Specific Element Count
Given a vector v and a element e, return the number of occurrences of e in v.
Note: NaNs are equal and there may be no occurrences of e in v
Example:
v = 1:10 e = 2 output = 1
Solution Stats
Problem Comments
Solution Comments
Show commentsProblem Recent Solvers936
Suggested Problems
-
Find relatively common elements in matrix rows
2149 Solvers
-
Project Euler: Problem 1, Multiples of 3 and 5
3657 Solvers
-
Project Euler: Problem 6, Natural numbers, squares and sums.
2530 Solvers
-
Find out missing number from a vector of 9 elements
319 Solvers
-
String Array Basics, Part 1: Convert Cell Array to String Array; No Missing Values
1948 Solvers
More from this Author56
Problem Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!