MaxElements

This blocks computes the max of the element of an input matrix/vector. Based on the Max Along parameter, the output is either a scalar, a row vector or a column vector.

    MaxElements

Library

MatrixOperations

Description

This block computes the maximum of the elements of an input matrix/vector. Based on the Max Along parameter, the output is either a scalar, a row vector or a column vector. When "Max along" is set to "All", the maximum matrix element is outputted. When "Max along" is set to "Rows", maximum element in each row is outputted, results in a column vector. When "Max along" is set to "Columns", maximum element in each column is outputted, results in a row vector.

Parameters

MaxElements_0

NameLabelDescriptionData TypeValid Values

decomptyp

Max along

Specify how the maximum is computed in given matrix.

String

'All'
'Rows'
'Columns'

mindex

Index of the maximum element

This parameter defines if the block returns the index of the maximum element in the input.

Number

0
1

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+mindex

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