summaryrefslogtreecommitdiff
path: root/2303/CH5/EX5.1/5_1.sce
diff options
context:
space:
mode:
Diffstat (limited to '2303/CH5/EX5.1/5_1.sce')
-rwxr-xr-x2303/CH5/EX5.1/5_1.sce17
1 files changed, 17 insertions, 0 deletions
diff --git a/2303/CH5/EX5.1/5_1.sce b/2303/CH5/EX5.1/5_1.sce
new file mode 100755
index 000000000..5b86a8373
--- /dev/null
+++ b/2303/CH5/EX5.1/5_1.sce
@@ -0,0 +1,17 @@
+//Example 5.1
+
+
+clc;
+clear;
+close;
+x=[0 1 2 3];
+//compute DFT by definition
+w=-%i;
+X=[0 0 0 0]
+for i=1:4
+ for j=1:4
+ X(i)=X(i)+x(j)*w^((i-1)*(j-1));
+ end
+end
+//Displaying DFT
+disp(X,"X[k]=");