Find non unique string in a table
Mostra commenti meno recenti
Hi!
I have a table "TT" which I want to return the "Ticket" of non unique string in the "Alpha".
TT =
8×2 table
Ticket Alpha
_______ ________
29991 AB'
29991 CD'
29993 EF'
30018 GH'
30066 IJ'
30105 KL'
30105 EF'
30107 NO'
here EF in not unique under "Alpha" and I want to return "30105". How can i do this?
Risposta accettata
Più risposte (2)
Sean de Wolski
il 8 Ago 2019
n = groupcounts(T.Alpha)
[~, last] = unique(T.Alpha, 'last')
T.Ticket(last(n>1))
Using the "new and shiny" groupcounts.
Sonima
il 9 Ago 2019
Categorie
Scopri di più su Tables in Centro assistenza e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!