Increase counter for each element in array
Ältere Kommentare anzeigen
Hey,
given A = [1 1 3 4 5 6 6 7 7 7]. How could I return the sequence B =[1 2 1 1 1 1 2 1 2 3] such that each duplicate is counted and B is the same size as A?
I appreciate your help!
Akzeptierte Antwort
Weitere Antworten (0)
Kategorien
Mehr zu Licensing on Cloud Platforms finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!