List correlation
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).
yes but what if the list numbers are different, say 0.25, 0., 0.93. etc?
:)
if no mathematical relations can be found, [coll] can be an easy solution to translate numbers into other numbers.
Use listfunnel to put the list in a coll, sort, and renumber. The indices are the values you’re looking for.
or compute it straight away:
Thanks both examples work perfectly! I really appreciate the help.