Fast Fourier transform: Difference between revisions
Content added Content deleted
Line 619: | Line 619: | ||
<lang MATLAB> fft([1,1,1,1,0,0,0,0]') |
<lang MATLAB> fft([1,1,1,1,0,0,0,0]') |
||
function d = myfft(x) |
|||
if x>1 |
|||
l2 = L/2; |
|||
a = myfft(x(1:2:L-1)); |
|||
b = myfft(x(2:2:L)); |
|||
c = (cos(2*pi*L^-1)-j*sin(2*pi*L^-1)).^[0:l2-1]; |
|||
c1 = c.*b; |
|||
d = [(a+c1),(a-c1)]; |
|||
else |
|||
d = x; |
|||
end |
|||
</lang> |
</lang> |
||
Output: |
Output: |