MATLAB Solving an integer with FFT in matlab

AI Thread Summary
The discussion centers on solving a homework problem involving the Fast Fourier Transform (FFT) in MATLAB. The task is to compute the integral of the function x^2 * exp(-x^2) over the range from negative to positive infinity using FFT. The individual seeking help expresses difficulty in finding relevant information and resources on applying the Fourier transform for this specific problem. They mention their familiarity with performing FFTs in MATLAB but are unsure about the steps needed to arrive at the solution. The response suggests using the FFT to compute amplitudes with the command Y = fft(...) and then applying the inverse FFT with y = ifft(...) to obtain the final result. It also advises consulting MATLAB's help system for further guidance on the necessary arguments.
ser23
Messages
6
Reaction score
0

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:



Homework Equations



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

The Attempt at a Solution


I checked the definition of the Fourier transform and I checked in books, MATLAB everywhere and I can't find any info that could help me, I hope someone here can, THANK YOU.
 
Physics 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.
 

Similar threads

Replies
5
Views
2K
Replies
8
Views
7K
Replies
1
Views
2K
Replies
2
Views
2K
Replies
1
Views
2K
Replies
10
Views
6K
Back
Top