Matrix - Get
This function block reads a number of elements from the matrix MX beginning a defined position.
The position will be given by the index of the column (nInd) and the row (mInd). The dimension of the matrix to get can be configured. The new matrix will be given at the output MY.
Operation
Parameters
The parameter dialog can be used to select a data type and to assign the dimension of the output matrix. The number of rows and columns can be set to a value between 1 and 9999 each.
Signals
Name | I/O | Type(s) | Function |
---|---|---|---|
MX | I | Data type independent | Input matrix |
nInd | I | WORD | Starting index for columns |
mInd | I | WORD | Starting index for rows |
MY | O | datentypunabhängig | Output matrix |
Visualization
The dimension of the output matrix is shown in the form of rows x columns in the down right corner of the function block symbol.
Comments
The first row/column of the matrix has the index of 0.
A negative index is allowed. In this case the first |mInd| rows or |nInd| columns of the output matrix are set to 0, until the first appropriate element of the input matrix is reached.
If the function block is set to get elements beyond the last row or column of the input matrix, these elements are set to 0 in the output matrix.
If no connection exists at the output another data type can be assigned by creating a new connection on input MX.
If the data type is changed by the parameter dialog all invalid connections will be deleted.