Need help to solve FFT and IFFT by mathematica
- To: mathgroup at smc.vnet.net
- Subject: [mg117568] Need help to solve FFT and IFFT by mathematica
- From: Gazi Habiba Akter <gazihabiba02 at gmail.com>
- Date: Wed, 23 Mar 2011 02:53:01 -0500 (EST)
Hello,
I want to solve FFT and IFFT in the same problem. My function is
Exp[2*(1 + I*c)*T^2].
For FFT, I used the following code:
ClearAll["Global'*"]
c = 0;
f[t_] = Exp[-(1 + I*c)*2*t^2];
sampleTime = .01;
data1 = Table[f[t], {t, -5, 5, sampleTime}];
freq1 = Fourier[data1];
now I need to do IFFT of ( freq1*Exp[-0.5*(z/(1 - I*v))] ) function.
Before perform IFFT, i converted Exp[-0.5*(z/(1 - I*v))] into
frequency data as same matrix of freq1. Here is my code:
s = Exp[-0.5*(z/(1 - I*v))];
data2 = Table[s, {v, 0, 2000*Pi, 2*Pi}];
Then i performed IFFT by
freq2 = InverseFourier[data2*freq1];
Now i am confused whether my IFFT solution way is correct or not. I
got idea of sampling frequency , Table[s, {v, 0, 2200*Pi, 2*Pi}]
from some tutorial. Is there any another way I can calculate
IFFT for my function???
Finally i want to plot (Abs[freq2])^2 with respect to time for
different value of z.
z=1;
ListLinePlot[(Abs[freq2]*Abs[freq2]), PlotRange -> Full]
But i got the curve in terms of data value 0 to 1000.
How can i get the curve with respect to time now??
Thanks,
Gazi