How do I freqency shift a signal by a fractional amount using IFFT and FFT?

52 views (last 30 days)
Let me preface this with: I am an extreme novice when it comes to FFTs.
I have a signal vector x of length 1200. To shift the frequency of the signal I am doing the following:
y=IFFT(x);
SHIFT=1;
t=[1:1200]*2*pi/1200;
for j=1:1200
mult(j)=exp(-i*SHIFT*t(j));
z=mult.*y;
end
w=real(fft(z));
When SHIFT is an integer I get what I am looking for in w, which is the signal x shifted by the value of SHIFT. However, when SHIFT is fractional the vector w looks like some combination between a shifted x and its derivative.
My question is: what do I do to shift x by a fractional amount using FFTs and IFFTs?
Thanks,
Victoria

Answers (1)

Matt J
Matt J on 11 Jun 2013
You would do something like this
N=length(y);
mult = exp(-1i*2*pi/N*(0:N-1)*SHIFT);
w=ifft((fft(y).*mult ),'symmetric')
  5 Comments
Matt J
Matt J on 3 Aug 2020
No, the first version does not use linear interpolation and so will be different from the others.

Sign in to comment.

Community Treasure Hunt

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

Start Hunting!