matrix
Syntax
- m := matrix(a<,i2><,f>...)
Creates a new matrix type.
- How the matrix is created and initialized depends on the types provided as arguments
- If integers are provided as the first two arguments, then a matrix of that size is created. Optionally, values can follow initializing the elements of the matrix. These values follow in row order. Meaning the entire first row first, followed by row 2, etc.
If a list is given, then two more integer arguments must be provided to specify the size of the matrix to convert the list into. Each list element is converted to a double, again by row.
If a vector is given, then the list is converted into a 2x1 or 3x1 matrix using the vector components to initialize the matrix elements.
If a tensor is given, then a 3x3 symmetric matrix is created from the tensor.
A 1-dimensional array is converted to an Nx1 matrix. A two dimensional array is converted to a matching size matrix. Each array element is converted to a floating point value.
Was this helpful? ... | Itasca Software © 2024, Itasca | Updated: Aug 13, 2024 |