MATLAB Function Reference Previous page   Next Page
fliplr

Flip matrices left-right

Syntax

Description

B = fliplr(A) returns A with columns flipped in the left-right direction, that is, about a vertical axis.

If A is a row vector, then fliplr(A) returns a vector of the same length with the order of its elements reversed. If A is a column vector, then fliplr(A) simply returns A.

Examples

If A is the 3-by-2 matrix,

then fliplr(A) produces

If A is a row vector,

then fliplr(A) produces

Limitations

The array being operated on cannot have more than two dimensions. This limitation exists because the axis upon which to flip a multidimensional array would be undefined.

See Also

flipdim, flipud, rot90


Previous page  flipdim flipud Next page

© 1994-2005 The MathWorks, Inc.