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

Solving an integer with FFT in matlab

  1. Apr 7, 2008 #1
    1. The problem statement, all variables and given/known data

    Hi, I hope someone could help me, I have been trying to solve this problem with FFT in matlab, why?, because my teacher gave it as homework. The problem is the following.

    Obtain the value of the following integer using FFT:

    2. Relevant equations

    the integer goes from [-infinte, infinite], and the function is x^2*exp(-x^2)*dx

    3. The attempt at a solution
    I checked the definition of the fourier transform and I checked in books, matlab everywhere and I cant find any info that could help me, I hope someone here can, THANK YOU.
  2. jcsd
  3. Apr 7, 2008 #2
    I'm pretty new to the transform but I have been doing some FFTs in matlab lately and this is what i've been doing:

    first you have to find the amplitudes with:

    Y = fft(...)

    then you have to do the inverse FFT to find your answer:

    y = ifft(..)

    check the help system for the arguments and i think you'll see how to do it.
Share this great discussion with others via Reddit, Google+, Twitter, or Facebook