fliplrFlipping array left to right
fliplr(A)A, whose elements along the second dimension have reversed order.A if the second dimension is singleton.flipdim(A, 2).fliplrcan operate on multi-dimensional arrays.a = randi(10,3,3,3)
fliplr(a)
a(:, :, 1) =
1.000 8.000 3.000
5.000 2.000 10.00
9.000 9.000 2.000
a(:, :, 2) =
5.000 1.000 8.000
2.000 8.000 7.000
8.000 7.000 10.00
a(:, :, 3) =
3.000 2.000 4.000
1.000 9.000 4.000
1.000 4.000 1.000
ans(:, :, 1) =
3.000 8.000 1.000
10.00 2.000 5.000
2.000 9.000 9.000
ans(:, :, 2) =
8.000 1.000 5.000
7.000 8.000 2.000
10.00 7.000 8.000
ans(:, :, 3) =
4.000 2.000 3.000
4.000 9.000 1.000
1.000 4.000 1.000