Cumulative Sum
Partial sum of the elements of a channel, column or row.
Description
The Cumulative Sum block calculates a partial (intermediate) sum over a given input measurement or time.
Ports
Input
In - input signal
vector
| matrix
Input signal in the form of a vector or matrix containing real or complex values.
Data types: Float16
, Float32
, Float64
, Int8
, Int16
, Int32
, Int64
, UInt8
, UInt16
, UInt32
, UInt64
.
Support for complex numbers: Yes
Rst - reset
scalar
Optional reset port, accepts scalar values which can be any built-in data type including Bool
. The input rate to the Rst port must be the same or lower than the data input rate.
Dependencies
This port appears only when you set the Reset port parameter to a value other than None
.
Data types: Float16
, Float32
, Float64
, Int8
, Int16
, Int32
, Int64
, UInt8
, UInt16
, UInt32
, UInt64
, Bool
.
Parameters
Sum input along - dimension to summarise
Channels (by default)
| Columns
| Rows
The dimension along which cumulative sums are calculated. You can cumulate over Channels
, Columns
or Rows
.
Input processing - input processing method
Columns as channels (by default)
| Elements as channels
.
Set how the block processes the input when calculating the current sum over the input channels. You can set this parameter to one of the following options:
-
Columns as channels
- the block processes each input column as a separate channel. -
Elements as channels
- the block processes each input element as a separate channel.
Dependencies
This parameter is available only if the Sum input along parameter is set to Channels
.
Reset port - reset event
None (by default)
| Rising edge
| Falling edge
| Either edge
| Non-zero sample
.
Defines a reset event that causes the block to reset the sum across channels. The input rate to the Rst port must be the same or slower than the data input rate. The reset calculation step must be a positive integer multiple of the input calculation step.
Dependencies
This parameter is only available when the Sum input along parameter is set to Channels
.