# Solving an integer with FFT in matlab

• MATLAB

## Main Question or Discussion Point

1. Homework Statement

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. Homework 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.

## Answers and Replies

Related MATLAB, Maple, Mathematica, LaTeX News on Phys.org
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.