summaryrefslogtreecommitdiff
path: root/40/CH8/EX8.20/Exa_8_20.sce
blob: a87b490796d2256a3ff3e3d0a4cc85d95713bf43 (plain)
1
2
3
4
5
6
7
8
9
//A four point decimation-in-frequency FFT algorithm
x=[1 2 1 0];
w=-%i;
xdft(1)=x(1)+x(3)+x(2)+x(4);
xdft(2)=x(1)-x(3)+w*(x(2)-x(4));
xdft(3)=x(1)+x(3)-x(2)-x(4);
xdft(4)=x(1)-x(3)-w*(x(2)-x(4));
XDFT=dft(x,-1);
xdft,XDFT