MATLAB: Circular Shifting of fixed length

circular shiftdft

hi guys, i would like to ask is there any command that can shift an n-point sequence by m points. Can u use fftshift or do i need to write a function ?

Best Answer

there is a function, circshift that will do exactly what you want.
x_shift = circshift(x, [m 0]); % Column Vector
x_shift = circshift(x, [0 m]); % Row Vector
Note that ‘m’ can be either positive or negative, depending on the direction you want to do the shift.