summaryrefslogtreecommitdiff
path: root/692/CH3/EX3.13/P3_13.sce
diff options
context:
space:
mode:
Diffstat (limited to '692/CH3/EX3.13/P3_13.sce')
-rwxr-xr-x692/CH3/EX3.13/P3_13.sce33
1 files changed, 33 insertions, 0 deletions
diff --git a/692/CH3/EX3.13/P3_13.sce b/692/CH3/EX3.13/P3_13.sce
new file mode 100755
index 000000000..4b3b29de3
--- /dev/null
+++ b/692/CH3/EX3.13/P3_13.sce
@@ -0,0 +1,33 @@
+//EXAMPLE 3.13
+
+clc;
+clear;
+a=0.5;
+n=0:9;
+for i = 0:9
+ x(i+1) = a^i;
+end
+//The DTFT of the sequence
+K = 4;
+k = 0:4/1000:4;
+W = k*6*%pi/K;
+X1 = (x')*exp(%i*n'*W);
+X = %i*diff(X1);
+X = [X,0] + X1;
+
+X_mag = abs(X);
+[X_phase,db] = phasemag(X);
+
+clf();
+a=gca();
+figure(0);
+plot2d3(mtlb_fliplr(W),X_mag);
+xtitle('Magnitude response','W','X_mag');
+figure(1);
+plot2d3(mtlb_fliplr(W),X_phase);
+xtitle('Phase response','W','X_phase');
+
+
+
+
+