Cumulative Sum
Partial sum of channel, column, or row elements.
blockType: CumulativeSum
Path in the library:
|
Description
Block Cumulative Sum calculates a partial (intermediate) sum by a given Input dimension or by time.
Ports
Input
In — input signal
vector | the matrix
An 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
An additional reset port accepts scalar values, which can be any built-in data type, including Bool. The input speed to the Rst port must be the same or lower than the data input speed.
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 — measurement for summing
Channels (by default) | Columns | Rows
The dimension by which the cumulative sums are calculated. You can summarize by Channels, Columns or Rows.
Input processing — input processing method
Columns as channels (by default) | Elements as channels
Specify how the block processes the Input when calculating the current amount through the Input channels. You can set one of the following options for this parameter:
-
Columns as channels— the block treats each input column as a separate channel. -
Elements as channels— the block processes each input element as a separate channel.
Dependencies
This parameter is only available if the Sum input along parameter is set to Channels.
Reset port — pass reset event:q[<br>] None (by default) | Rising edge | Falling edge | Either edge | Non-zero sample
Defines a reset event that causes the block to reset the channel amount. The input speed to the Rst port must be the same or slower than the data input speed. The reset calculation step must be a positive integer multiple of the input calculation step.
Dependencies
This parameter is only available if the Sum input along parameter is set to Channels.