Documentation Home Page HYPERSIM Home Page
Pour la documentation en FRANÇAIS, utilisez l'outil de traduction de votre navigateur Chrome, Edge ou Safari. Voir un exemple.

Mathematical | CUMSUM

CUMULATIVE SUM – [CUMSUM]
Outputs the cumulative sum of input over time.


CATEGORY
Mathematical

DESCRIPTION
Outputs the cumulative sum of input over time.


RESULT VARIABLES AND PARAMETERS

ResultCumulative sum
SignalInput


SYNTAX

res=cumsum(input)

CHARACTERISTICS
Data type support
Double Floating point


EXAMPLE
In the below example, a signal of constant value of 1 is given as input to the function cumsum. The sampling frequency is set at 20000 samples/second. Thus, in a duration of 0.1 second, there will be 2000 sample points. Thus, output of the function is the sum of 1 over each sampling period. At the end of 0.1 second, the output value will be 2000.

OPAL-RT TECHNOLOGIES, Inc. | 1751, rue Richardson, bureau 1060 | Montréal, Québec Canada H3K 1G6 | opal-rt.com | +1 514-935-2323
Follow OPAL-RT: LinkedIn | Facebook | YouTube | X/Twitter