and, interestingly, this
{{1,2},{3,4}}
returns the matrix
12
34
However, you can create lists of lists and even more complicated data structures by using the list as an
expression in an equation. Casting the first example in this form like this
{3,a={1,2},b={3,4}}
simply returns the list in the same form. Note that a and b must not exist as variables in the current
folder. The second example above would be
{a={1,2},b={3,4}}
The equation variables a and b need not be unique. To reduce the chance that the equation variables
are already in use, you can use international characters, for example
{ä={1,2},ä={3,4}}
On the other hand, you can use the equation variables to label the lists:
{result1={1,2},result2={3,4}}
You can build nested lists of lists:
{ä={1,2,ä={3,4,ä={5,6}}}}
To extract the individual list elements, use the right() function and the list element indices. Suppose we
save a lists of lists to variable r:
{ä={1,2},ä={3,4}}→r
then
r[1]
returns
ä={1,2}
r[2]
returns
ä={3,4}
right(r[1])
returns
{1,2}
right(r[2])
returns
{3,4}
You can also include matrices in lists with this method:
{ä=[1,2;3,4],ä=[5;6]}
(Credit to Bhuvanesh Bhatt)
[3.25] Internal Error with seq() and Boolean operators in list index calculation
TI confirms that list index calculations involving a Boolean operator will fail with an Internal Error, when
the calculation is performed in a seq() function call. This limitation applies to AMS 2.05. This will fail:
3 - 28