.Modelica.Math.Matrices.flipLeftRight

Information

Syntax

A_flr = Matrices.flipLeftRight(A);

Description

Function flipLeftRight computes from matrix A a matrix A_flr with flipped columns, i.e., A_flr[:,i]=A[:,n-i+1], i=1,..., n.

Example

A = [1, 2,  3;
     3, 4,  5;
    -1, 2, -3];

A_flr = flipLeftRight(A);

results in:

A_flr = [3, 2,  1;
         5, 4,  3;
        -3, 2, -1]

See also

Matrices.flipUpDown

Interface

function flipLeftRight
  extends Modelica.Icons.Function;
  input Real A[:, :] "Matrix to be flipped";
  output Real Aflip[size(A, 1), size(A, 2)] "Flipped matrix";
end flipLeftRight;

Revisions


Generated at 2020-06-05T21:39:08Z by OpenModelica 1.16.0~dev-442-g2e5bc9f