MX_FNX – Matrix and vector scalar functions
Block SymbolLicensing group: STANDARD
Function Description
The MX_FNX block returns the result of the function specified by the efunc parameter to the
output val. The function is applied to the elements of the matrix or vector referenced by uMV.
For matrices, a specific column can be selected by the col input. By setting col = -1, the
whole matrix is considered. Depending on the efunc parameter, the aux output displays an
auxiliary value:
- efunc = 1:Minimum: aux contains the index of the element with the minimum value,
- efunc = 2:Maximum: aux contains the index of the element with the maximum value,
- efunc = 3:Sum: aux contains the number of summed elements,
- efunc = 4:Average: aux contains the number of averaged elements,
- efunc = 5:Standard deviation: aux contains the number of elements for the calculation of the standard deviation,
- efunc = 6:RMS: aux contains the number of elements for the calculation of the root mean square.
The output reference yMV is always set to the corresponding input reference uMV.
By setting HLD = on, the calculation is stopped, but the references are passed further. The error flag E is set to on, if:
- the reference uMV is not defined (i.e. the input uMV is not connected),
- the input col is out of the range of columns of the matrix referenced by uMV.
This block does not propagate the signal quality. More information can be found in the 1.4 section.
Input
uMV | Input reference to a matrix or vector | Reference |
col | Column index (-1 for whole matrix) | Long (I32) |
HLD | Hold | Bool |
Parameter
efunc | Function type 1 | Long (I32) |
|
|
|
NZ | Process non-zero values only | Bool |
tol | Tolerance for zero detection | Double (F64) |
Output
yMV | Output reference to a matrix or vector | Reference |
val | Function value | Double (F64) |
aux | Function auxiliary value | Long (I32) |
E | Error indicator | Bool |
[Previous] [Back to top] [Up] [Next]
2025 © REX Controls s.r.o., www.rexygen.com