FFT Using Overlap Add Method: 'Enter Input Signal X:' 'Enter Impulse Signal H:'
FFT Using Overlap Add Method: 'Enter Input Signal X:' 'Enter Impulse Signal H:'
xwork3 = xwork3.';
xwork3=ifft(xwork3);
xwork3 = xwork3.';
%completed wid ifft
IFFT=xwork3;
%adding the last n-1
z=1;
IFFT
for i=1:nb-1
%
k=i+1;
nextrowscol=1;
if(i==1.0)
u=1; %temp variable for j
else
u=nozero+1;
end
for j=u:l+nozero;
if(j<=l)
output(z)=xwork3(i,j);
z=z+1;
else
output(z)=xwork3(i,j)+xwork3((i+1),nextrowscol);
nextrowscol=nextrowscol+1;
z=z+1;
end
end
end
title('The output by inbuilt is : ');
a=conv(x,h)
a
title('The output by program is : ');
output
OUTPUT:
Enter input signal x:[1 2 3 4 5 6 7 8 9 10]
Enter impulse signal h:[1 2]
Enter the block size:3
Number of blocks
appending_zeroes =
1
4
7
10
1
2
5
8
0
2
3
6
9
0
0
0
0
0
0
0
FFT =
6.0000
15.0000
24.0000
10.0000
3.0000
-2.0000 - 2.0000i
-2.0000 - 5.0000i
-2.0000 - 8.0000i
10.0000
1.0000 - 2.0000i
2.0000
5.0000
8.0000
10.0000
-1.0000
-2.0000 + 2.0000i
-2.0000 + 5.0000i
-2.0000 + 8.0000i
10.0000
1.0000 + 2.0000i
IFFT =
1 4
7
4 13 16
7 22 25
10 20 0
6
12
18
0
a=
1
10
13
16
19
22
25
28
20
10
13
16
19
22
25
28
20
10
13
16
19
22
25
28
20
a=
1
output =
1