A_flr = Matrices.flipLeftRight(A);
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.
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]
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;