The Math Forum

Search All of the Math Forum:

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

Math Forum » Discussions » Software » comp.soft-sys.matlab

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  

Advanced Search

Back to Topic List Back to Topic List  

Posts: 21
Registered: 5/20/12
about translation in signal with fft
Posted: Nov 10, 2014 10:56 PM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

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 found one old post here about the same topic

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?

Point your RSS reader here for a feed of the latest messages in this topic.

[Privacy Policy] [Terms of Use]

© The Math Forum at NCTM 1994-2018. All Rights Reserved.