<< rceps Signal Processing Supplementary toolbox stmcb >>

Signal Processing Supplementary toolbox >> Signal Processing Supplementary toolbox > shiftdim

shiftdim

Shifts the dimensions of a multi-dimensional array.

Calling Sequence

b = shiftdim(x)
b = shiftdim(x,n)
[b,nshifts] = shiftdim(x)
[b,nshifts] = shiftdim(x,n)

Arguments

x

a matrix or multidimensional array.

n

an integer by which the dimension of the given array is to be shifted.

b

dimension shifted array

nshifts

Amount of shift introduced.

Description

It shifts the dimension of a multi-dimensional array by a given amount and direction specified in the second argument. If the second argument is positive, it shifts the dimension to the left and if negative it shifts the dimension to the right.

Examples

r=rand(3,4,3);
y=shiftdim(r,2);

See Also

Authors


Report an issue
<< rceps Signal Processing Supplementary toolbox stmcb >>