SumElements
This blocks computes the sum of the element of an input matrix/vector. Based on the Sum Along parameter, the output is either a scalar, a row vector or a column vector.
Library
MatrixOperations
Description
The SumElements block returns the sum of the element of an input matrix/vector.
The input matrix can be either of type Double or type Complex.
When the Sum along parameter is set to all, the block outputs the sum of all the elements of the matrix. The output is then a scalar.
When the Sum along parameter is set to Rows the block performs a row-wise sum. The output is a column vector.
When the Sum along is set to Columns, the block is a column-wise sum. The output is a row vector.
Parameters
Name | Label | Description | Data Type | Valid Values |
---|---|---|---|---|
decomptyp | Sum along | String | 'All' | |
overflow | Do on overflow | String | 'Nothing' | |
externalActivation | External activation | 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 |