Search
Lists
Untitled (the Wolfram Language for Students - Personal Use Only : www.wolfram.com)

Lists

As we saw, lists can be created using braces

Lists_1.png

Lists_2.png

We can perform arithmetic operations on lists

Lists_3.png

Lists_4.png

Lists_5.png

Lists_6.png

The entries of a list are accessed using double-brackets (or the special notation [[ ]])
The entries are indexed starting with one

Lists_7.png

Lists_8.png

Lists_9.png

Lists_10.png

We can also index a list using a list

Lists_11.png

Lists_12.png

Lists can be mutated this way

Lists_13.png

Lists_14.png

Lists_15.png

Lists_16.png

Creating Lists

Simple ranges can be constructed using Range

Lists_17.png

Lists_18.png

Lists_19.png

Lists_20.png

Lists_21.png

Lists_22.png

Much more flexible is Table, which allows for the creation of lists using expressions

Lists_23.png

Lists_24.png

Lists_25.png

Lists_26.png

Lists_27.png

Lists_28.png

Table can also be used to create matrices (which are represnted as lists of lists)

Lists_29.png

Lists_30.png

Matrices can be displayed nicely using MatrixForm

Lists_31.png

Lists_32.png

Note: functions can also be evaluated using postfix notation with the // operator

Lists_33.png

Lists_34.png