Single indexing into a vector is done with a pair of parenthesis () Indexing is one based.
> x = [1, 2, 3];
> print(x(1))
1
Single indexing into a matrix is done by a pair of indices in parenthesis () where the first index encapsulates the row number and the second index encapsulates the column number.
> x = [1, 2, 3; 4, 5, 6]; print(x)
[Matrix] (2 x 3)
1 2 3
4 5 6
> print(x(1,3)) // first row & third column
3
If a single index is used for a matrix, it is a linear indexing. That is, the specified element in the matrix is located by traversing the matrix along each column starting with the element at the first row and first column. You can think of a matrix as a column stored in memory as a vector.
> x = [1, 2, 3; 4, 5, 6]
[Matrix] (2 x 3)
1 2 3
4 5 6
> print (x(2), x(4))
4 5