A multidimensional generalization of
rev(): given an array
a, and a Boolean vector
swap, return an array of the
same shape as
a but with dimensions corresponding to
swap reversed. If
swap is not Boolean, it is
interpreted as the dimensions along which to swap.
Array to be reversed
Vector of Boolean variables. If
swap is not Boolean, it is equivalent to
n is the number of dimensions). Thus multiple
entries are ignored, as are entries greater than
a is a vector,
rev(a) is returned.
arev() handles zero-extent dimensions as expected.
arev() does not treat singleton dimensions specially,
and is thus different from Octave's
flipdim(), which (if
supplied with no second argument) flips the first nonsingleton
dimension. To reproduce this, use
Robin K. S. Hankin
1 2 3 4 5
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.