functionflipLeftRight
Flip the columns of a matrix in left/right direction
Extends from Modelica.Icons.Function (Icon for functions).
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
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