flipud
Flips an array from top to bottom.
Category: Language Fundamentals > Matrices and Arrays
Syntax
B = flipud(A)
Reverses the order of the rows of A.
Description
The first row becomes the last. For a column vector this reverses the whole vector. It equals flip(A, 1) and A(end:-1:1, :).
Input arguments
A- Array of any type.
Output arguments
B- Array of the same size as
A.
Example
flipud([1 2; 3 4; 5 6])
Output
ans = 3×2
5 6
3 4
1 2