summaryrefslogtreecommitdiff
path: root/40/CH8/EX8.21/Exa_8_21.sce
diff options
context:
space:
mode:
Diffstat (limited to '40/CH8/EX8.21/Exa_8_21.sce')
-rwxr-xr-x40/CH8/EX8.21/Exa_8_21.sce11
1 files changed, 11 insertions, 0 deletions
diff --git a/40/CH8/EX8.21/Exa_8_21.sce b/40/CH8/EX8.21/Exa_8_21.sce
new file mode 100755
index 000000000..0014814a8
--- /dev/null
+++ b/40/CH8/EX8.21/Exa_8_21.sce
@@ -0,0 +1,11 @@
+//A four point decimation-in-time FFT algorithm
+x=[1 2 1 0];
+w=-%i;
+xdft=[0 0 0 0];
+for i=1:4
+ for j=1:4
+ xdft(i)=xdft(i)+x(j)*w^((i-1)*(j-1));
+ end
+end
+XDFT=dft(x,-1);
+xdft,XDFT \ No newline at end of file