For example, throwing a dice 10 times, the result could be recorded by 2 lists:
L1 = {1,2,3,4,5,6}
L2 = {1,2,1,3,2,2}
Is there an easy way to generate a sample list, say
L3 = {1,2,2,3,4,4,4,5,5,6,6}?
I'm not sure if there are any TI-BASIC functions that can do this already, but this is the type of situation where a
sorting algorithm comes in handy.
Edit:
I see what you're looking for now, disregard what I initially said.
The only way that I know to do this is to iterate through the distribution list in a for-loop, then use another for-loop to append the # of elements you read to the list. You'd initialize the output list's dimensions by using sum( on the distribution list.
I did not understand the question. I do now. See Jacobly's reply.
Code: seq(L₁(1+sum(X>cumSum(L₂))),X,1,sum(L₂→L₃