Script Function ReferenceFunction Reference >Script Function Reference >Table Formats>matrixMatrixThe matrix format is a table representing a matrix.
x.type = "matrix"
Here is an example using the list format.
x.row -- represents the number of rows x.col -- represents the number of colums x[1:row][1:col] -- the elements in the matrix, each element is a number format
function getcolumn(matrix, column)
ret = {} ret.type = "list" ret.len = matrix.row for i = 1,matrix.row do ret[i] = matrix[i][column].r end return ret end |