File Exchange

image thumbnail

Shift Vector

version (1.48 KB) by Sebastian
Shifts a row or column vector by an input number of elements


Updated 31 May 2013

View License

B = shiftVector(A,shiftsize) will shift the vector A left/up (if shiftsize is positive) or right/down (if shiftsize is negative) by shiftsize steps, and move the elements that are cut off back to the opposite end.

Cite As

Sebastian (2020). Shift Vector (, MATLAB Central File Exchange. Retrieved .

Comments and Ratings (1)


Isn't that just doing what the built-in circshift does?

MATLAB Release Compatibility
Created with R2009b
Compatible with any release
Platform Compatibility
Windows macOS Linux

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!