Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

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

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top