Specifications
Section 8. Processing and Math Instructions
8-28
RMSSpa (Dest, Swath, Source)
Used to compute the root mean square (RMS) value of an array.
Syntax
RMSSpa(Dest, Swath, Source)
Remarks
Spatial RMS, Calculate the root mean square of values in an array.
()
Dest
Xi
s
wath
ij
ijswath
=
=
=+
∑
()
2
Where X(j) = Source
Parameter
& Data Type
Enter
Dest
Variable
The variable in which to store the RMS value.
Swath
Constant
The number of values of the array to include in the RMS calculation.
Source
Array
The name of the variable array that is the input for the instruction.
RND
The RND function is used to generate a random number.
Syntax
Variable = RND
Remarks
The RND function returns a single value less than 1 but greater than or equal
to 0.
The same random-number sequence is generated each time the instruction is
encountered because each successive call to the RND function uses the
previous random number as a seed for the next number in the random-number
sequence. To have the program generate a different random-number sequence
each time it is run, use the Randomize statement with no Number argument to
initialize the random-number generator before RND is called.
To produce random integers in a given range, use this formula:
INT( ( upperbound - lowerbound + 1 ) * RND + lowerbound )
Here, upperbound is the highest number in the range, and lowerbound is the
lowest number in the range.