Forums

IFFT for OFDM

Started by hat_zak2002 February 25, 2004
I write this code to get IFFT for y but only spectrum drawn not time
domain siganal ploted:

t = -5:0.001:5;
y1 = sin(pi*(t+1))./(pi*(t+1));
y2 = sin(pi*(t+2))./(pi*(t+2));
y3 = sin(pi*(t+3))./(pi*(t+3));
y0 = sin(pi*t)./(pi*t);
y11= sin(pi*(t-1))./(pi*(t-1));
y22= sin(pi*(t-2))./(pi*(t-2));
y33= sin(pi*(t-3))./(pi*(t-3));
y=y1+y2+y3+y0+y11+y22+y33;
subplot(2,1,1);
plot(t,y);
axis ([-6 6 -0.5 1.2]);
xlabel ('Frequency Domain');
grid on
zoom on
subplot(2,1,2);
fre= real(ifft(y));
plot(t,fre);
xlabel ('Time Domain'); Regards,
Hatem Zakaria