Cooley–Tukey FFT algorithm matlab code OR some othr fft code(not built in)4 filtering

Status
Not open for further replies.
C in-place fft for 2^log2n points
c paul dent 1966 approx
subroutine fft(f,log2n)
complex f(0:65535),c,u,s
c=cmplx(-1.0,0.0)
n=lshift(1,log2n)
l2=1
do 1 l=0,log2n-1
l1=l2
l2=lshift(l2,1)
u=cmplx(1.0,0.0)
do 2 j=0,l1-1
do 3 i=j,n-1,l2
i1=i+l1
s=u*f(i1)
f(i1)=f(i)-s
f(i)=f(i)+s
3 continue
u=c*u
2 continue
cr=sqrt(0.5*(1.0+real(c)))
ci=aimag(c)/(2.0*cr)
c=cmplx(cr,ci)
1 continue
return
end
 

Status
Not open for further replies.

Similar threads

Cookies are required to use this site. You must accept them to continue using the site. Learn more…