Problem 39. Which values occur exactly three times?
Return a list of all values (sorted smallest to largest) that appear exactly three times in the input vector x. So if
x = [1 2 5 2 2 7 8 3 3 1 3 8 8 8]
then
y = [2 3]
Solution Stats
Problem Comments
-
5 Comments
why 'tabulate' function does not work here. It gives an error saying undefined function.
http://www.mathworks.in/help/stats/tabulate.html
Ashan, tabulate is in stats. Cody does not have Statistics Toolbox.
the in-build function tabulate cannot used in here.
I never thought I could use this line of code for this problem but what do you know
i have used a loop construct for this but apparently there are far faster ways (length: 20ish instead of 80-100)
Solution Comments
Show commentsProblem Recent Solvers5084
Suggested Problems
-
It dseon't mettar waht oedrr the lrettes in a wrod are.
1792 Solvers
-
Number of 1s in the Binary Representation of a Number
443 Solvers
-
5173 Solvers
-
String Array Basics, Part 1: Convert Cell Array to String Array; No Missing Values
1503 Solvers
-
Convert from Fahrenheit to Celsius
23744 Solvers
More from this Author96
Problem Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!