CumulativeSum
This block sums the element of an input M-by-N matrix along the rows, columns or first non-singleton dimension. When the "Sum by" parameter is set to "Rows", the block sums across the elements of each row. The result is displayed as an M-by-1 matrix. When the "Sum by" parameter is set to "Columns", the block sums across the elements of each column, and the result is displayed as a 1-by-N matrix.
Library
MatrixOperations
Description
The CumulativeSum block sums the entries of an input, M-by-N, matrix along either the rows, the columns or the first non singleton dimension. When the "Sum by" parameter is set to "Rows", the block sums across the elements of each row. The result is displayed as an M-by-1 matrix. When the "Sum by" parameter is set to "Columns", the block sums across the elements of each column. The result is displayed as a 1-by-N matrix.
Parameters
Name | Label | Description | Data Type | Valid Values |
---|---|---|---|---|
decomptyp | Sum by | This parameter defines the way summation is performed. | String | 'Rows' |
overflow | Do on overflow | String | 'Nothing' | |
externalActivation | External activation | Specifies whether the block receives an external activation or inherits its activation through its regular input ports. When External Activation is selected, an additional activation port is added to the block. By default, external activation is not selected. | Number | 0 |
Ports
Name | Type | Description | IO Type | Number |
---|---|---|---|---|
Port 1 | explicit | input | 1 | |
Port 2 | explicit | output | 1 | |
Port 3 | activation | input | externalActivation |
Advanced Properties
Name | Value | Description |
---|---|---|
always active | no | |
direct-feedthrough | yes | |
zero-crossing | no | |
mode | no | |
continuous-time state | no | |
discrete-time state | no |