DSPRelated.com
Forums

Inverse FFT, Please Help!

Started by xiangyuanjiang2000 September 28, 2005
Hi, I'm in desperate need to understand how to inverse FFT my data. I
believe I've successfully performed a forward transform, now I need to
inverse it back to the time domain to make sure I can play the
original
data.
Yes, I'm a DSP newbie and from what I've read, I think I can run the
forward transformed data back through the FFT function to get it back
to the time domain. I've also been told that I have to do some 1/N
scaling, but I'm not sure what this means or how exactly I apply it to
my FFT'd data.
Thank you!
My code is:
w0=0.8e9;
dw=0.4e9;
gama^-4;
c>8;
lamda=2*pi*c/w0;
% dw=5*lamda;
z=1*lamda;
% z1=5*lamda;

wp9;
wm=0.8e9;
w=0.0001e9:0.001e9:2e9;
e=1-wp.^2./(w.^2+i.*gama.*w);
u=1-wm.^2./(w.^2+i.*gama.*w);
if e<0&u<0
n=-sqrt(e.*u);
else
n=sqrt(e.*u);
end

nn=real(n)+i*abs(imag(n));
F=exp(-(w-w0).^2./dw.^2);
E=F.*exp(i.*w.*nn.*z./c);
Y=ifft(E);
EEs(E).^2;

N=length(Y);
Y(1)=[];
power = abs(Y(1:N-1)).^2;
nyquist = 1/2;
time = (1:N-1)/(N-1)*nyquist;
plot(time,power);
grid on
xlabel('cycles/time');
title('Pulse');