Info
This question is closed. Reopen it to edit or answer.
How to give index to each replicated number?
1 view (last 30 days)
Show older comments
For example, when I have a=[1,1,1,1,3,3,4,4,4], I would like the output to be b=[1,2,3,4,1,2,1,2,3].
2 Comments
Answers (2)
See Also
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!