MX_DSAREF – Set reference to subarray of A into B

Block SymbolLicensing group: STANDARD
PIC

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 Mi, where M is number of rows of the matrix referenced by uA.
  • Number of columns of the submatrix is set to Nj, where N is number of columns of the matrix referenced by uA.
  • The first element in position (0,0) of the submatrix is the element of the matrix referenced by uA in position (i,j), 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 > i M.
  • 0 > j N.

Inputs

uA

Input reference to matrix A

Reference

i

Index of the subarray first row  0.00E+00

Long(I32)

j

Index of the subarray first column  0.00E+00

Long(I32)

HLD

Hold

Bool

Parameter

ay

Output reference of the subarray  [0 0]

Double (F64)

Outputs

yA

Output reference to matrix A

Reference

yB

Output reference to matrix B

Reference

E

Error indicator

Bool

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