.Modelica.Math.Matrices.flipUpDown

Information

Syntax

         A_fud = Matrices.flipUpDown(A);

Description

Function flipUpDown computes from matrix A a matrix A_fud with flipped rows, i.e., A_fud[i,:]=A[n-i+1,:], i=1,..., n.

Example

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

  A_fud = flipUpDown(A);

  results in:

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

See also

Matrices.flipLeftRight

Interface

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

Revisions


Generated at 2020-06-05T07:38:22Z by OpenModelica 1.16.0~dev-420-gc007a39