MX_DIMSET – Set Matrix/Vector dimensions

Block SymbolLicensing group: STANDARD
PIC

Function Description
The function block MX_DIMSET sets number rows m of the vector or number of rows m, number of columns n and the leading dimension ld of the matrix referenced by uMV. If any of the inputs m, n, ld is not connected, its original value is retained.

The output cnt contains the actual number of occupied elements of the matrix/vector and is determined by the formula

cnt = ld (n 1) + m amax,

where the output amax is the allocated count of matrix/vector elements. If this inequality is fulfilled the output cnt is set to the matrix/vector structure and can be retrieved by the MX_DIM block, otherwise the value of cnt shows the minimum necessary number of elements of the matrix/vector.

The output reference yMV is always set to the corresponding input reference uMV.

The error flag E is set to on if:

  • the reference uMV is not defined (i.e. input uMV is not connected),
  • the number of rows m < 1 or m > ld,
  • the number of columns n < 1,
  • the required number of elements cnt > amax.

Inputs

uMV

Input reference to a matrix or vector

Reference

m

Number of matrix rows

Long (I32)

ld

Leading dimension (>= number of rows)

Long (I32)

Outputs

yMV

Output reference to a matrix or vector

Reference

cnt

Count of used matrix/vector elements

Long (I32)

amax

Number of allocated matrix/vector elements

Long (I32)

E

Error indicator

Bool

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