reverse

Reverse vector elements (e.g., v[1] becomes last element)

Information

This information is part of the Modelica Standard Library maintained by the Modelica Association.

Syntax

Vectors.reverse(v);

Description

The function call "Vectors.reverse(v)" returns the vector elements in reverse order.

Example

reverse({1,2,3,4});  // = {4,3,2,1}

Syntax

result = reverse(v)

Inputs (1)

v

Type: Real[:]

Description: Real vector

Outputs (1)

result

Type: Real[size(v, 1)]

Description: Elements of vector v in reversed order