Support

Equilla Formula Language

SummationSqrArray

Returns the sum of squares of all or some elements in an array.

Inputs

Array
Array: The array containing the data to be summed up.
NumElements
Numeric: (Optional) Number of elements to sum up.

Examples

Sum of squares of all elements
Variable: result; Array: myDynamicArray[]; FillArray(myDynamicArray, 3, 4, 5, 2, 7); result = SummationSqrArray(myDynamicArray); print(result); // prints 103
Sum of squares of the first four elements
Variable: result; Array: myDynamicArray[]; FillArray(myDynamicArray, 3, 4, 5, 2, 7); result = SummationSqrArray(myDynamicArray, 4); print(result); // prints 54