Shift dimensions of categorical array
Syntax
B = shiftdim(A,n)
[B,nshifts] = shiftdim(A)
Description
B = shiftdim(A,n) shifts the dimensions
of the categorical array A by N.
When n is positive, shiftdim shifts
the dimensions to the left and wraps the n leading
dimensions to the end. When n is negative, shiftdim shifts
the dimensions to the right and pads with singletons.
[B,nshifts] = shiftdim(A) returns the array B with
the same number of elements as A but with any leading
singleton dimensions removed. nshifts returns the
number of dimensions that are removed. If A is
a scalar, shiftdim has no effect.
See Also
circshift, reshape, squeeze
 | SharedCov property (gmdistribution) | | Sigma property (gmdistribution) |  |
Includes the most popular MATLAB recorded presentations with Q&A sessions led by MATLAB experts.
Get the Interactive Kit