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 complex vector elements in reverse order.

Example

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

Syntax

result = reverse(v)

Inputs (1)

v

Type: Complex[:]

Description: Vector

Outputs (1)

result

Type: Complex[size(v, 1)]

Description: Elements of vector v in reversed order