Products & Services Industries Academia Support User Community Company

Learn more about Statistics Toolbox   

shiftdim - Class: categorical

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

  


Recommended Products

Includes the most popular MATLAB recorded presentations with Q&A sessions led by MATLAB experts.

 © 1984-2009- The MathWorks, Inc.    -   Site Help   -   Patents   -   Trademarks   -   Privacy Policy   -   Preventing Piracy   -   RSS