FlipDimension - Maple Help

Online Help

All Products    Maple    MapleSim

ArrayTools

 FlipDimension
 reverse order of elements in an Array

 Calling Sequence FlipDimension(A, dim)

Parameters

 A - Matrix, Vector, or Array dim - integer; dimension to flip

Description

 • The FlipDimension command reverses the order of elements in dimension, dim, of Array, A.
 • This function is part of the ArrayTools package, so it can be used in the short form FlipDimension(..) only after executing the command with(ArrayTools).  However, it can always be accessed through the long form of the command by using ArrayTools[FlipDimension](..).

Examples

 > $\mathrm{with}\left(\mathrm{ArrayTools}\right):$
 > $\mathrm{FlipDimension}\left(\mathrm{Array}\left(\left[\left[a,b,c\right],\left[d,e,f\right],\left[g,h,i\right]\right]\right),1\right)$
 $\left[\begin{array}{ccc}{g}& {h}& {i}\\ {d}& {e}& {f}\\ {a}& {b}& {c}\end{array}\right]$ (1)
 > $\mathrm{FlipDimension}\left(\mathrm{Array}\left(\left[\left[a,b,c\right],\left[d,e,f\right],\left[g,h,i\right]\right]\right),2\right)$
 $\left[\begin{array}{ccc}{c}& {b}& {a}\\ {f}& {e}& {d}\\ {i}& {h}& {g}\end{array}\right]$ (2)

 See Also