MATLAB Function Reference Previous page   Next Page
circshift

Shift array circularly

Syntax

Description

B = circshift(A,shiftsize) circularly shifts the values in the array, A, by shiftsize elements. shiftsize is a vector of integer scalars where the n-th element specifies the shift amount for the n-th dimension of array A. If an element in shiftsize is positive, the values of A are shifted down (or to the right). If it is negative, the values of A are shifted up (or to the left). If it is 0, the values in that dimension are not shifted.

Example

Circularly shift first dimension values down by 1.

Circularly shift first dimension values down by 1 and second dimension values to the left by 1.

See Also

fftshift, shiftdim


Previous page  cholupdate cla Next page

© 1994-2005 The MathWorks, Inc.