StudentIDs_List=[100,101,102,103,104,104];[n, bin] = histc(StudentIDs_List, unique(StudentIDs_List));Multiple_IDs = find(n > 1);Index = find(ismember(bin, Multiple_IDs));StudentID_With_Repetition = StudentIDs_List(Index)
I will get result that finds the values with more occurrences like below
StudentID_With_Repetition = 104 104
What is the solution if StudentIDs_List is a mix of letters and numbers, i.e)
StudentIDs_List=[a100,a101,a102,a103,a104,a104];
The above code didn't help me for my problem? Any different approaches or solution? Thanks in Advance!
Best Answer