Overview
You can make lists in Desmos using square brackets like this:
You can create lists with evenly spaced elements. [1,...,10] is a list of the integers between 1 and 10. [1,3,...,11] is a list of the odd integers between 1 and 11. Table columns are available as lists in the rest of the system.
You can use lists anywhere in expressions that you would use a number.
If L is a list, you can refer to the first element of L with L[1], produce a list of the first, third, and fifth elements of L with L[1,3,5], produce a list of the third through fifth elements of L with L[3...5], and produce a list of the third through last elements of L with L[3...]. If M is also a list, then L[M] produces a list of the elements of L given by the indices in M.
You can also select the elements of a list that satisfy a condition: for example, if L is a list, then L[L>0] selects the positive elements of L, and L[mod(L,2)=0] selects the even elements of L.
32 Comments