1D Fourier shift (Scripts) Publisher's description
This code uses the Fourier shift theorem to cyclically shift 1D signals by an arbitrary amount
This code uses the Fourier shift theorem to cyclically shift 1D signals by an arbitrary amount. Both integer and non-integer shifts work.
It also supports padding the signal with zeros so that the shift appears non-cyclic (although it really isn't). If this is done then the shift amount is clamped so that the signal can't cycle round again.
It works with signals of any length and is completely vectorised.
y = FourierShift(x, delta, zero_pad)
x = input vector (column or row)
y = output column vector
delta = shift amount in samples
zero_pad (optional) = if set to 'pad' then it simulates non-cyclic shifting
for ii = -50:0.4:50
plot(FourierShift(sinc(-2:0.1:2), ii, 'pad'))
System Requirements:MATLAB 7.6 (R2008a)
Program Release Status: New Release
Program Install Support: Install and Uninstall