Main Content
flip
Flip order of elements
Description
B = flip(
returns
array A
)B
the same size as A
,
but with the order of the elements reversed. The dimension that is
reordered in B
depends on the shape of A
:
If
A
is vector, thenflip(A)
reverses the order of the elements along the length of the vector.If
A
is a matrix, thenflip(A)
reverses the elements in each column.If
A
is an N-D array, thenflip(A)
operates on the first dimension ofA
in which the size value is not1
.
Examples
Input Arguments
Extended Capabilities
Version History
Introduced in R2013b