Skip to content

circshift

general · scripts/general/circshift.m

: b = circshift (a, k)
: b = circshift (a, k, dim)

Shift the elements of a circularly.

A scalar k shifts along the first non-singleton dimension; a vector k shifts dimension i by k(i). With dim the shift k is applied along dimension dim (both may be vectors of equal length). Positive shifts move elements towards higher indices.