francorbusetti
New Member
- Joined
- Dec 14, 2005
- Messages
- 13
I have a list (column, say) of numbers. They will be recalculated continuously as part of an optimization routine.
I need to generate another list (column) that counts the number of different duplicates in the original list, preferably ranked. (This is what the Tally command does in Mathematica.)
e.g. {21 7 3 7 7 3} => {3 2 1}
{21 7 3 7 21 2} => {2 2 1 1}
{21 7 3 2 1 0} => {1 1 1 1 1 1}
Any ideas?
I need to generate another list (column) that counts the number of different duplicates in the original list, preferably ranked. (This is what the Tally command does in Mathematica.)
e.g. {21 7 3 7 7 3} => {3 2 1}
{21 7 3 7 21 2} => {2 2 1 1}
{21 7 3 2 1 0} => {1 1 1 1 1 1}
Any ideas?