Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

FFT using Green function

  1. Aug 24, 2015 #1
    Hi everybody.
    I have a (1×N) Green function in MATLAB. I want to use the FFt function for Green function to transform the time domain. Does the FFT command work correctly for Green function using: A=fft(Green function, nfft). Here nfft is the number of transformed points. Is it necessary that N=nfft ?
  2. jcsd
  3. Aug 24, 2015 #2
    Why don't you try and tell us the result? Then we can analyze if something goes as not expected.
  4. Aug 24, 2015 #3
    I tried and I wanted to be sure that using fft command is true for non-periodic function like Green function or not?
  5. Aug 25, 2015 #4


    User Avatar
    Science Advisor
    Gold Member

    The FFT function in Matlab is really no different than other implementations of discrete Fourier transform. Hence, when you are using if for a non-periodic function (which in real life is almost always) you need to consider things like zero-padding (which is usually a good idea for non-periodic functions) and windowing ( should not really be needed here). One common -and not so obvious- problem is the way the elements in the resulting FFT are ordered. You may or mat not have to use the fftshift command, depending on what you are doing.
  6. Aug 25, 2015 #5
    Thank you.
  7. Sep 24, 2015 #6
    I would like to know that if my Green function was nonzero in almost energies (because the energy interval is from -infinity to infinity) is it necessary that I have zero padding?
    Another question is that when I use the FFT without zero padding, my function goes to high orders. For example, if the value of the function is 0.4 the fft goes it to 10e03. Is it ordinary or not?
  8. Oct 2, 2015 #7
    The proper use of the FFT implies that the function is periodic. The zero padding ensure that the function can be interpreted as "periodic" because when you shift the computational windows you can match them because they all go to zero at the boundary. Using FFT without padding implies that you function is truly periodic, it is continuous across the left-right boundary, left boundary value is equal to the right boundary value. When you have jumps in the function, inside the computational domain or because the left boundary values is different from the right one, then you will see those high order components.
Share this great discussion with others via Reddit, Google+, Twitter, or Facebook