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
-
4 Comments
Show
1 older comment
Ashan Peiris
on 14 Jun 2014
why 'tabulate' function does not work here. It gives an error saying undefined function.
http://www.mathworks.in/help/stats/tabulate.html
Christopher Creutzig
on 24 Jul 2014
Ashan, tabulate is in stats. Cody does not have Statistics Toolbox.
Luyu Wang
on 10 Jul 2018
the in-build function tabulate cannot used in here.
Mitchell
on 27 Nov 2023 at 22:32
I never thought I could use this line of code for this problem but what do you know
Solution Comments
Show commentsProblem Recent Solvers4843
Suggested Problems
-
Project Euler: Problem 7, Nth prime
1310 Solvers
-
435 Solvers
-
Create an n-by-n null matrix and fill with ones certain positions
520 Solvers
-
1309 Solvers
-
Find my daddy long leg (No 's')
1942 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!