This specifies the element identification number (integer > 0). This number is unique to all
Reference_Matrix elements.
label
Specifies the name of the Reference_Matrix element. This parameter is optional.
nrow
The number of rows in the matrix. nrow > 0
ncol
The number of columns in the matrix. ncol > 0
isroworder
Set to "TRUE" if
the matrix is specified in row order. When not specified, it
implies that the matrix elements are specified in a column
order. This argument is valid only for dense matrices.
issparse
Set to "TRUE" for
sparse matrices. Do not use when the matrix is dense.
nval
Specifies the number of non-zero entries for a sparse matrix. Do not use when defining a dense
matrix. When specified, Nval > 0
usrsub_dll_name
Specifies the path and name of the DLL or shared library containing the user subroutine.
MotionSolve uses this information to load the user subroutine Matrix_Read in the DLL at run time.
usrsub_param_string
Define the list of parameters that are passed from the data file to the user-defined subroutine. This attribute is common to all types of user subroutines and scripts.
usrsub_fnc_name
Specifies an alternative name for the user subroutine Matrix_Read.
script_name
Specifies the path and name of the user written script that contains the routine specified by
usrsub_fnc_name.
interpreter
Specifies the interpreted language that the user script is written
in (example: "PYTHON"). See User-Written Subroutines for a choice of valid
interpreted languages.
Example
The following example defines a dense matrix with 4 rows and 5 columns. The
data is specified in row order.
The third example illustrates how to specify a sparse matrix.
Assume that a 10x10 matrix is to be specified. However, only 13 of these
entries are non-zero. These are highlighted in light green below. In such
situations, it is more efficient to specify the matrix as sparse instead of
dense. The sparse matrix only requires the definition of the 13 non-zero
entries whereas the dense matrix would require specification of all 100
entries.Figure 1.
The MotionSolve statement for specifying the above
matrix in sparse format is:
Reference_Matrix elements are referenced by
Reference_ParamCurve and
Control_Stateeqn elements. They may also be used as
needed in other user-subroutines.
Use the sparse matrix format when two-thirds or more of the
elements are zero.
Use the user-written subroutine,
Matrix_Read, to read matrix data from a file.