Model Element |
||||||||||||||||||||||||||||||||
Class NameMatrix DescriptionMatrix defines a general, real-valued, M x N matrix for use in MotionSolve. Matrices may be specified in two different ways in MotionSolve with this interface:
|
||||||||||||||||||||||||||||||||
Attribute Summary
Usage |
||||||||||||||||||||||||||||||||
#1: Dense Matrix Format (row or column order) Matrix (rows=integer, columns=integer, values=list, optional_attributes)
#2. Sparse matrix in COO format Matrix (sparse=True, rows=integer, columns=integer, i=list, j=list, values=list, optional_attributes) |
||||||||||||||||||||||||||||||||
Attribute Description |
||||||||||||||||||||||||||||||||
Dense Matrix Format |
||||||||||||||||||||||||||||||||
rows |
Integer The number of rows in the matrix. The attribute rows is mandatory. rows > 0 |
|||||||||||||||||||||||||||||||
columns |
Integer The number of columns in the matrix. The attribute columns is mandatory. columns > 0. |
|||||||||||||||||||||||||||||||
values
|
List of Doubles Specifies the elements of the matrix. The ordering – by row or column is determined the argument full. The default ordering is by column. The number of entries in the values list = rows x columns. The attribute values is mandatory. |
|||||||||||||||||||||||||||||||
full |
String Set to full="RORDER" if the matrix is specified in row order. The attribute full is optional. When not specified or when full="CORDER", it implies that the matrix elements are specified in column order. |
|||||||||||||||||||||||||||||||
Sparse Matrix in COO Format |
||||||||||||||||||||||||||||||||
sparse |
Boolean Set to True. The attribute sparse is mandatory. |
|||||||||||||||||||||||||||||||
rows |
Integer The number of rows in the matrix. The attribute rows is mandatory. rows > 0 |
|||||||||||||||||||||||||||||||
columns |
Integer The number of columns in the matrix. The attribute columns is mandatory. columns > 0. |
|||||||||||||||||||||||||||||||
i |
List of Integers Specifies the row position of each element in the values attribute. The i argument is mandatory. Note: len (i) = len (j) = len (values) = Number of non-zero entries in the matrix. len (i) > 0 |
|||||||||||||||||||||||||||||||
j |
List of Integers Specifies the column position of each element in the values attribute. The j argument is mandatory. Note: len (i) = len (j) = len (values) = Number of non-zero entries in the matrix. len (j) > 0 |
|||||||||||||||||||||||||||||||
values
|
List of Doubles Specifies the elements of the matrix. The attribute values is mandatory. Note: len (i) = len (j) = len (values) = Number of non-zero entries in the matrix. len (values) > 0 |
|||||||||||||||||||||||||||||||
Optional Attributes – Available to all variants |
||||||||||||||||||||||||||||||||
id |
Integer Specifies the element identification number. This number must be unique among all the Matrix objects in the model. This attribute is optional. MotionSolve will automatically create an ID when one is not specified. Range of values: id > 0 |
|||||||||||||||||||||||||||||||
label |
String Specifies the name of the Matrix object. This attribute is optional. When not specified, MotionSolve will create a label for you. |
|||||||||||||||||||||||||||||||
Comments
|
||||||||||||||||||||||||||||||||
Example
|