temp(t+1:t+2) = temp(t+1:t+2) + myfun(x(t+1:t+2),2^l);
temp2(k+1:k+4) = temp2(k+1:k+4) + myfun(temp(k+1:k+4),2^l);
temp3(k+1:k+8) = temp3(k+1:k+8) + myfun(temp2(k+1:k+8),2^l);
temp4(k+1:k+16) = temp4(k+1:k+16) + myfun(temp3(k+1:k+16),2^l);
temp5(k+1:k+32) = temp5(k+1:k+32) + myfun(temp4(k+1:k+32),2^l);
temp6(k+1:k+64) = temp6(k+1:k+64) + myfun(temp5(k+1:k+64),2^l);
temp7(k+1:k+128) = temp7(k+1:k+128) + myfun(temp6(k+1:k+128),2^l);
x
x =
-4 0 2 2 0 5 -4 -5 4 1 1 -3 -1 1 -5 0 1 -4 2 -5 -1 4 4 -3 -2 1 -3 5 -5 5
stem(abs(out),'filled','LineStyle',"--","Marker","diamond","Color",'b',"LineWidth",1)
title("Without Inbuilt Function","FontSize",15)
stem(abs(x_fft),'filled','LineStyle',"-.",'Marker',"*","color",'r',"LineWidth",1)
title("With Inbuilt Function","FontSize",15)
stem(abs(x_fft),'filled','LineStyle',"-.",'Marker',"*","color",'r',"LineWidth",1)
stem(abs(out),'filled','LineStyle',"none","Marker","diamond","Color",'b',"LineWidth",1)
title("Overlapping","FontSize",15)
function out = myfun(inp,N)
inp1 = [inp(1:N/2),inp(1:N/2)];
inp2 = [inp(N/2+1:N),inp(N/2+1:N)];
out(i) = inp1(i) + twi(i)*inp2(i);
function out = twiddle(N)
out(k) = exp(-1j*2*pi*(k-1)/N);