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.

    CumulativeSum

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

CumulativeSum_0

NameLabelDescriptionData TypeValid Values

decomptyp

Sum by

This parameter defines the way summation is performed.
if "Sum by" parameter is set to "Rows", the block sums across the elements of each row.
if "Sum by" parameter is set to "Columns", the block sums across the elements of each column.

String

'Rows'
'Columns'

overflow

Do on overflow

String

'Nothing'
'Saturate'
'Error'

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
1

Ports

NameTypeDescriptionIO TypeNumber

Port 1

explicit

input

1

Port 2

explicit

output

1

Port 3

activation

input

externalActivation

Advanced Properties

NameValueDescription

always active

no

direct-feedthrough

yes

zero-crossing

no

mode

no

continuous-time state

no

discrete-time state

no

See Also