Tutorial
Vectors
Another data type is vec. vectors and other data types like arrays
and matrices are defined using brackets. So in order to specify the
data type you want, you use :. For example, to define, respectively, a vector, an
array of integers and a matrix, we do:
atlas> set v=vec:[4,6,7]
Identifier v: vec
atlas> v
Value: [ 4, 6, 7 ]
atlas> set w=[4,6,7]
Identifier w: [int]
atlas> w
Value: [4,6,7]
atlas> set A=mat:[[2,4],[1,3]]
Identifier A: mat
atlas> A
Value:
| 2, 1 |
| 4, 3 |
atlas>