functionflipUpDown
Flip the rows of a matrix in up/down direction
Extends from Modelica.Icons.Function (Icon for functions).
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
Inputs
| Type | Name | Default | Description |
|---|---|---|---|
| Real[:,:] | A | Matrix to be flipped |
Outputs
| Type | Name | Default | Description |
|---|---|---|---|
| Real[size(A, 1),size(A, 2)] | Aflip | Flipped matrix |
Revisions
- 2010/05/31 by Marcus Baur, DLR-RM