1
$\begingroup$

$F^\ast(x(t))=F(x^\ast(-t))$

I'm trying to use this identity in Matlab. I expect this should translate to:

conj(fft(x)) == fft(conj(flip(x)))

It doesn't work out. I run:

x = rand(1, 4) + 1i*rand(1, 4);  
f1 = conj(fft(x));  
f2 = fft(conj(flip(x)));

And here are the results:

x  
0.9649 + 0.4854i   0.1576 + 0.8003i   0.9706 + 0.1419i   0.9572 + 0.4218i

f1  
3.0503 - 1.8493i   0.3728 - 1.1430i   0.8207 + 0.5948i  -0.3842 + 0.4561i

f2  
3.0503 - 1.8493i   1.1430 + 0.3728i  -0.8207 - 0.5948i   0.4561 + 0.3842i

Am I misunderstanding something about how this identity translates to samples?

$\endgroup$
1
  • $\begingroup$ Take a look at this $\endgroup$
    – Jdip
    May 24 at 6:28

1 Answer 1

6
$\begingroup$

flip() isn't the same as a time reversal. For a "true" time reversal the sample at t = 0 stays put, but flip() puts at the end of the array.

You can use a circulate shift to get it back to the first spot.

%%
x = rand(1, 4) + 1i*rand(1, 4);  
f1 = conj(fft(x));  
f2 = fft(conj(circshift(flip(x),1)));

EDIT:

The property you cite in your question is a property of the continuous Fourier Transform. However, in your code you use the FFT which is an implementation of the Discrete Fourier Transform (DFT). It follows directly from the definition of the DFT that both signals are periodic with N. So we have $x[-4] = x[0] = x[4] ...$, $x[-3] = x[1] = x[5] ...$, ... If you want to interpret the vector with negative time indices you get [0,-3,-2,-1]

$\endgroup$
3
  • $\begingroup$ Thanks Hilmar. This works for me, but I don't understand why. If my original 4 samples correspond to times [0, 1, 2, 3] seconds then shouldn't my time reversed samples correspond to [-3, -2, -1, 0] seconds? Why shift to [0, -3, -2, -1]? $\endgroup$
    – Levi
    May 24 at 16:24
  • $\begingroup$ Discrete time reversal is modulo N $\endgroup$
    – Jdip
    May 24 at 21:08
  • $\begingroup$ @Levi: see updated answer. It's too complicated for a comment. $\endgroup$
    – Hilmar
    May 24 at 21:52

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.