rmax

Returns a vector where the value for each index is the maximum value from the range of index 0 to this index.

Syntax

rmax(vector)

Argument

vector
A valid vector.

Example

Templex Expression Results
{a={1,0,2,-1,3,-2,5,-2}}

{rmax(a)}

1, 1, 2, 2, 3, 3, 5, 5
{a={1,0,2,-1,5,-2,3,-2}}

{rmax(a)}

1, 1, 2, 2, 5, 5, 5, 5
{a={5,0,2,-1,3,-2,1,-2}}

{rmax(a)}

5, 5, 5, 5, 5, 5, 5, 5
Figure 1.


Comments

  • Scalars and matrices are not supported as arguments.
  • It works only in HyperGraph as part of the Safety Tools.