SummationSqrArray (Function)
The SummationSqrArray function performs a summation of the square of array elements.
Syntax
SummationSqrArray(PriceArray, Size)
Returns (Double)
A numeric value containing the sum of the squares of array elements.
Parameters
|
Name |
Type |
Description |
|
PriceArray |
Numeric Array |
Specifies the name of a numeric array upon which the summation of squares is calculated. |
|
Size |
Numeric |
Sets the number of data elements (size) in the array to evaluate. |
Remarks
This function accumulates the squared values of the array and returns the sum total.
The value for the Size input parameter should always be a whole number greater than 0 and is typically equal to the number of data elements in the array.
The SummationSqrArray function only works with one-dimensional arrays.
The first element of the array that is used by this function is element 1. Element 0 of the array is not used.
Example
The following assigns the summed squares of elements 1 to 20 of myArray to the pre-declared variable Value1 (element 0 of myArray is ignored):
Array: myArray[20](0);
{… add EL statements here to assign values to array elements... }
Value1 = SummationSqrArray(MyArray, 20);