I really don't see the point of that kind of problems where you can't use Matlab built-in functions.
which functions?
Return a list sorted by number of occurrences
1514 Solvers
Which values occur exactly three times?
3835 Solvers
319 Solvers
5464 Solvers
383 Solvers
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!