Matrix - Rotate

This function block rotates a given matrix at input MX by n rows or columns.

The rows or the columns of the matrix MX will be shifted downwards/to the right (if n>0) or upwards/to the left (if n<0). Rows or columns moved beyond the matrix will be inserted at the beginning. The result will be written back to MX.

Parameters

The parameter dialog can be used to select whether rotate the rows or the columns.

Signals

Name I/O Type(s) Function
MX I/O Data type independent In-/Output matrix
n I WORD Number of positions to rotate

Visualization

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

Comments

The data type can be assigned by connecting the input MX.