.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 2024-12-26T19:25:54Z by OpenModelicaOpenModelica 1.24.3 using GenerateDoc.mos