### MX_DSAREF – Set reference to subarray of A into B

Block SymbolLicensing group: STANDARD

Function Description
The function block MX_DSAREF creates a reference yB to the subarray (submatrix) of matrix referenced by uA. This operation is very fast because no matrix element is copied.

The output reference yA is always set to the corresponding input reference uA, the output reference yB is created inside each instance of this function block. If HLD = on then no other operation is performed otherwise the reference to the matrix yB is created with the following properties:

• Number of rows of the submatrix is set to $\mathtt{\text{M}}-\mathtt{\text{i}}$, where M is number of rows of the matrix referenced by uA.
• Number of columns of the submatrix is set to $\mathtt{\text{N}}-\mathtt{\text{j}}$, where N is number of columns of the matrix referenced by uA.
• The first element in position $\left(0,0\right)$ of the submatrix is the element of the matrix referenced by uA in position $\left(\mathtt{\text{i}},\mathtt{\text{j}}\right)$, all indices are zero based.
• The matrix referenced by yB has the same leading dimension as the matrix referenced by uA.

The error flag E is set to on if:

• the reference uA is not defined (i.e. input uA is not connected),
• $0>\mathtt{\text{i}}\ge \mathtt{\text{M}}$.
• $0>\mathtt{\text{j}}\ge \mathtt{\text{N}}$.

Inputs

 uA Input reference to matrix A Reference i Index of the subarray first row  $\odot$0.00E+00 Long(I32) j Index of the subarray first column  $\odot$0.00E+00 Long(I32) HLD Hold Bool

Parameter

 ay Output reference of the subarray  $\odot$[0 0] Double (F64)

Outputs

 yA Output reference to matrix A Reference yB Output reference to matrix B Reference E Error indicator Bool

2020 © REX Controls s.r.o., www.rexygen.com