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

Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 3 Current »

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.

  • No labels