Could someone help me to create a function in Matlab?. I have an array with 40 elements where some elements are duplicate.
I need to create a function that counts the duplicate values in the array and print like this i.e:
Number 21 repeats 4 time(s)
Number 25 repeats 1 time(s)
Number 40 repeats 3 time(s) etc.
Thank you in advance. I have been trying for hours.