# Combine two Lists into one

I searched and couldn’t find a similar topic but I assume this has to exist so I apologize if this is a duplicate. I am collecting numbers on Screen 1, 2, and 3. I can aggregate the numbers (from one screen) into a list on screen 4 and create a dotplot. Can I aggregate across all three screens easily - I don’t believe the ‘and’ function works since they are numbers and not booleans.

Our graph team is AMAZING and has a function for that:

C_{oncat}\left(L_1,L_2\right)=\sum_{n=\left[1...\operatorname{length}\left(L_1\right)+\operatorname{length}\left(L_2\right)\right]}^{\left[1...\operatorname{length}\left(L_1\right)+\operatorname{length}\left(L_2\right)\right]}\left\{n\le\operatorname{length}\left(L_1\right):L_1\left[n\right],L_2\left[n-\operatorname{length}\left(L_1\right)\right]\right\}

Just paste into a graph expression line and either create your lists or change the references in the function. Credit @aknauft

1 Like

I’ve used this example to help with ideas in the past. Would the Concatenate Lists folder work as well?

https://www.desmos.com/calculator/mwffimho5u

That. Is. Amazing!

Thank you so much!

You could leave x_1 in the table as just 1 and make a second column in your table for T_emp1.

Thank you so much for posting this!! I’ve been looking for this feature for years, and I just stumbled across this post. Keep up the great work!

1 Like

This “Advanced Lists” folder includes an example of how to sort a list from least to greatest. Can you modify it so it sorts from greatest to least?

In A_sorted, use this for the second parameter instead:

\left[1,1-\frac{1}{\operatorname{length}\left(A\right)-1}...,0\right]

I have my own list functions here (finding the index of a value has a function now I believe, so obsolete):

https://www.desmos.com/calculator/wbdncnszny

1 Like

If I wanted to join 5 lists, how do I modify this:

L=\sum_{n=\left[1…\operatorname{length}\left(L_{1}\right)+\operatorname{length}\left(L_{2}\right)\right]}^{\left[1…\operatorname{length}\left(L_{1}\right)+\operatorname{length}\left(L_{2}\right)\right]}\left{n\le\operatorname{length}\left(L_{1}\right):L_{1}\left[n\right],L_{2}\left[n-\operatorname{length}\left(L_{1}\right)\right]\right}

thanks

If I wanted to join 5 lists, how do I modify this:

L=\sum_{n=\left[1…\operatorname{length}\left(L_{1}\right)+\operatorname{length}\left(L_{2}\right)\right]}^{\left[1…\operatorname{length}\left(L_{1}\right)+\operatorname{length}\left(L_{2}\right)\right]}\left{n\le\operatorname{length}\left(L_{1}\right):L_{1}\left[n\right],L_{2}\left[n-\operatorname{length}\left(L_{1}\right)\right]\right}

thanks

There is a join function now that didn’t exist before. So you can just use something like L = join(list1,list2,…)

1 Like