shiftdim
Shift array dimensions
Syntax
B = shiftdim(A, n)
B = shiftdim(A)
[B, m] = shiftdim(A)
Input argument
A - Input array: vector, matrix or multidimensional array.
n - Number of positions: integer value.
Output argument
B - vector, matrix, or multidimensional array.
m - Number of dimensions removed: non-negative integer.
Description
shiftdim(A, n) reorganizes the dimensions of an array A by n positions.
Specifically, when n is a positive integer, it shifts the dimensions to the left, and when n is a negative integer, it shifts the dimensions to the right.
Example
See also
History
Author
Allan CORNET
Last updated