- #1

- 3

- 0

- A
- Thread starter Gama
- Start date

- #1

- 3

- 0

- #2

DrClaude

Mentor

- 7,497

- 3,774

I guess that what you got at the end there is the negative-frequency components. See, e.g.,I used a matrix to calculate the fourier transform of a lorentzian and it did generate a decaying exponential but that was followed by the mirror image of the exponential going up.

https://dsp.stackexchange.com/questions/2818/extracting-frequencies-from-fft

Exactly. It assumes that the first input element is at ##t=0##. If it is not, the result is equivalent to time shifting, which introduces a complex phase. You need to either shift back the complex phase or change the input, starting at ##t=0## and then use the periodicity implied by the Fourier transform to input at a later time the values corresponding to negative times in your case.Perhaps the fft does not treat it as centered at zero.

https://en.wikipedia.org/wiki/Fourier_transform#Translation_/_time_shifting

- #3

Henryk

Gold Member

- 252

- 98

That's why you observe the data point decaying for the first half of your spectrum, but exponentially raising in the second half. It is simply the result of frequencies actually decreasing in magnitude as index of array increases.

Similar thing explains why you getting complex values. If you want FFT to give you real values only (as you expect it should be) then, the first data point should be at t = 0, the second at t = dt, third at t = 2dt, etc. The data points at t < 0 should be placed at the end of the array and reflected back in time.

Or,

simply use Matlab FFT function that automatically centers both, time and frequency domain data

- #4

- Last Post

- Replies
- 5

- Views
- 781

- Last Post

- Replies
- 15

- Views
- 1K

- Replies
- 4

- Views
- 6K

- Replies
- 1

- Views
- 36K

- Last Post

- Replies
- 2

- Views
- 2K

- Last Post

- Replies
- 4

- Views
- 1K

- Last Post

- Replies
- 6

- Views
- 8K

- Last Post

- Replies
- 1

- Views
- 700

- Last Post

- Replies
- 5

- Views
- 1K

- Last Post

- Replies
- 5

- Views
- 5K