Search All of the Math Forum:

Views expressed in these public forums are not endorsed by NCTM or The Math Forum.

Notice: We are no longer accepting new posts, but the forums will continue to be readable.

Topic: about translation in signal with fft
Replies: 0

 Ki Posts: 21 Registered: 5/20/12
about translation in signal with fft
Posted: Nov 10, 2014 10:56 PM

Hi there,
I am trying to test the fft property. The first one I tried is on the translation property

f(x+a) <=> exp(-i*a*w)*F(w)

I modify the code a little bit as follows

angfreq = 2*pi*0.01;
N = 256;
n = 0:N-1;
%n = (-N/2):(N/2-1); % fail to reproduce the translation property if I use this
phi = 1;
a = 1;
w = 2*pi/N*n;

f = cos(angfreq*n);
e = exp(-i*w*a);
sf = real(ifft(ifftshift(fftshift(fft(f)).*e)));
plot(n, f);
hold on;
plot(n, sf,'r');

The plot shows a perfect translation by 1 unit with the operator exp(-i*w*a). There, the fourier frequency is defined as w = 2*pi/N*n; However, in fft should the frequency defines as w = 2*pi/M*[0:N/2, -N/2+1:-1] such that the zero order goes first, positive frequency follows and then the negative frequencies. However, if I defined it this way by making the n = (-N/2):(N/2-1); I fail to see the correct translation. Why is that?