List correlation

Michael's icon

I have a list made up of the following numbers eg 0.25, 0.5, 0., 0.75.,
I would now like to translate this list into whole numbers like so 1, 2, 0 ,3.
Does anyone have any suggestion on how I could go about doing this?

What I'm trying to do is rate each number in the list based on its size and then attribute a scale value to it where 0.25 is the second smallest (1), 0.5 is the second biggest (2), 0 is the smallest (0), and 0.75 is the biggest (3).

Roman Thilenius's icon
Michael's icon

yes but what if the list numbers are different, say 0.25, 0., 0.93. etc?

Roman Thilenius's icon


:)

if no mathematical relations can be found, [coll] can be an easy solution to translate numbers into other numbers.


Kenneth Newby's icon

Use listfunnel to put the list in a coll, sort, and renumber. The indices are the values you’re looking for.

Max Patch
Copy patch and select New From Clipboard in Max.

kLSDiz's icon

or compute it straight away:

Max Patch
Copy patch and select New From Clipboard in Max.

Michael's icon

Thanks both examples work perfectly! I really appreciate the help.