.ModelicaReference.Operators.'max()'

Information

Returns the largest element

Syntax

max(A)
max(x,y)
max(e(i, ..., j) for i in u, ..., j in v)

Description

The first form returns the largest element of array expression A.

The second form returns the largest element of the scalars x and y.

The third form is a reduction expression and returns the largest value of the scalar expression e(i, ..., j) evaluated for all combinations of i in u, ..., j in v

Examples

max(i^2 for i in {3,7,6})  // = 49

Generated at 2019-12-11T02:39:08Z by OpenModelicaOpenModelica 1.16.0~dev-72-gc3a557c using GenerateDoc.mos