flipudFlipping array upside down
flipud(A)A, whose elements along the first dimension have reversed order.A if its first dimension is singleton.flipdim(A, 1).flipud can operate on multi-dimensional arrays.a = randi(10,3,3,3)
flipud(a)
a(:, :, 1) =
2.000 3.000 10.00
3.000 3.000 9.000
2.000 10.00 2.000
a(:, :, 2) =
6.000 2.000 2.000
5.000 7.000 3.000
3.000 3.000 8.000
a(:, :, 3) =
5.000 7.000 6.000
7.000 5.000 2.000
10.00 4.000 6.000
ans(:, :, 1) =
2.000 10.00 2.000
3.000 3.000 9.000
2.000 3.000 10.00
ans(:, :, 2) =
3.000 3.000 8.000
5.000 7.000 3.000
6.000 2.000 2.000
ans(:, :, 3) =
10.00 4.000 6.000
7.000 5.000 2.000
5.000 7.000 6.000