Matrix - Set

This function block will set the elements from input MX2 to the destination matrix MX1 beginning from a defined position (row mInd and column nInd).

A single value, a vector, or a matrix is allowed for MX2. The original values in the matrix MX1 will be either overwritten or shifted away.


The parameter dialog can be used to select whether the new values will be overwrite the old ones or the new values will be inserted and the old ones will be shifted. When selecting the insert mode, the moving direction of the original values can be selected.


Name I/O Type(s) Function
MX1 I/O Data type independent In-/output matrix
MX2 I Data type independent Input matrix
nlnd I WORD Starting index for columns
mlnd I WORD Starting index for rows


An indication of the set mode will be shown in the symbol.


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 Matrix MX2 are not set until the first appropriate element of the output matrix is reached.

Only elements up to the maximum row/column of the output matrix will be set. Elements not fit into the output matrix will be ignored.

The data type can be assigned by connecting an input signal.