CumulativeSum (FPScript)

21.09.2021

Calculates the cumulative sum of a data set.

Syntax

CumulativeSum(DataSet)

 

The syntax of the CumulativeSum function consists of the following parts:

Part

Description

DataSet

The data set for which the sum is to be calculated.

All data structures are allowed, except scalar value und space curve. All numeric data types are permitted.

Remarks

The result always has the data type 64-bit floating point.

The result has the same unit as the argument DataSet.

For each value, the cumulative sum is the sum of this value and all preceding values in DataSet. If DataSet contains a void value at a certain position, then its valid predecessor is included in the sum for this position.

For data matrices and signal series, the calculation takes place column by column. The values are converted into 64-bit floating point values before the calculation is performed. The X and Z components, if present, are copied into the result without modification.

If the argument is a list, then the function is executed for each element of the list and the result is also a list.

For complex data types the absolute value is formed.

Available in

FlexPro Basic, Professional, Developer Suite

Examples

CumulativeSum({1., 4., 3.})

Results in {1, 5, 8}.

See Also

Integral Function

Sum Function

Share article or send as email:

You might be interested in these articles