MX_RAND – Randomly generated matrix or vector

Block SymbolLicensing group: STANDARD
PIC

Function Description
The function block MX_RAND generates random elements of the matrix or vector referenced by uMV.

The output reference yMV is always set to the corresponding input references uMV. If HLD = on then nothing is generated otherwise pseudo-random values of the matrix or vector elements referenced by uMV are generated using these rules:

The error flag E is set to on if the reference uMV is not defined (i.e. input uMV is not connected).

Inputs

uMV

Input reference to a matrix or vector

reference

nseed

Random number seed

long

SET

Set initial value of random number generator to nseed on rising edge

bool

HLD

Hold

bool

Parameters

BIP

Bipolar random values flag

bool

scale

Random values multiplication factor  1.0

double

Outputs

yMV

Output reference to a matrix or vector

reference

E

Error indicator

bool