MX_CNADD – Add scalar to each Matrix/Vector element

Block SymbolLicensing group: STANDARD
PIC

Function Description
The function block MX_CNADD adds the value of the input alpha to each matrix/vector element referenced by uAX and the result is stored to the matrix/vector referenced by uBY. If HLD = on then nothing is computed.

The output references yAX and yBY are always set to the corresponding input references uAX and uBY. The dimensions of the matrix/vector referenced by uBY are set to the dimensions of the matrix/vector referenced by uAX if they are different.

The error flag E is set to on if:

  • the reference uAX of uBY is not defined (i.e. input uAX or uBY is not connected),
  • the count of allocated elements of the matrix/vector referenced by uAX is different from the count of allocated elements of the matrix/vector referenced by uBY.

Inputs

uAX

Input reference to the matrix A or vector X

Reference

uBY

Input reference to the matrix B or vector Y

Reference

alpha

Scalar coefficient alpha

Double (F64)

HLD

Hold

Bool

Outputs

yAX

Output reference to the matrix A or vector X

Reference

yBY

Output reference to the matrix B or vector Y

Reference

E

Error indicator

Bool

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