File Exchange

image thumbnail

flipn

version 1.0 (10.1 KB) by

Flip multiple matrices using flipud, fliplr, or flipdim

0 Downloads

Updated

View License

These functions use flipud, fliplr, and flipdim for multiple inputs. See the documentation (the light bulb toward the right of this page) for details.

Syntax
Af = fliplrn(A)
[Af1,Af2,...,Afn] = fliplrn(A1,A2,...,An)
Af = flipudn(A)
[Af1,Af2,...,Afn] = flipudn(A1,A2,...,An)
Af = fliplrn(A,dim)
[Af1,Af2,...,Afn] = flipdimn(A1,A2,...,An,dim)

Description
Af = fliplrn(A) returns A with columns flipped in the left-right direction, that is, about a vertical axis. If A is a row vector, then fliplrn(A) returns a vector of the same length with the order of its elements reversed. If A is a column vector, then fliplrn(A) simply returns A. fliplrn with one input matrix is exactly the same as fliplr.

[Af1,Af2,...,Afn] = fliplrn(A1,A2,...,An) returns multiple matrices flipped about their vertical axes.

Af = flipudn(A) returns A with columns flipped in the up-down direction, that is, about a horizontal axis. If A is a column vector, then fliplrn(A) returns a vector of the same length with the order of its elements reversed. If A is a row vector, then fliplrn(A) simply returns A. flipudn with one input matrix is exactly the same as flipud.

[Af1,Af2,...,Afn] = flipudn(A1,A2,...,An) returns multiple matrices flipped about their horizontal axes.

Af = flipdimn(A,dim) returns A with dimension dim flipped. When the value of dim is 1, the array is flipped row-wise down. When dim is 2, the array is flipped columnwise left to right. flipdimn(A,1) is the same as flipudn(A), and flipdimn(A,2) is the same as fliplr(A). flipdimn with one input matrix is exactly the same as flipdim.

[Af1,Af2,...,Afn] = flipdimn(A1,A2,...,An,dim) returns multiple matrices with dimension dim flipped.

Comments and Ratings (0)

MATLAB Release
MATLAB 8.0 (R2012b)
Acknowledgements

Inspired by: clip

Download apps, toolboxes, and other File Exchange content using Add-On Explorer in MATLAB.

» Watch video

flipn_documentation/html/