diff options
Diffstat (limited to '3812/CH6/EX6.6/6_6.sce')
-rw-r--r-- | 3812/CH6/EX6.6/6_6.sce | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/3812/CH6/EX6.6/6_6.sce b/3812/CH6/EX6.6/6_6.sce new file mode 100644 index 000000000..07d4a2143 --- /dev/null +++ b/3812/CH6/EX6.6/6_6.sce @@ -0,0 +1,30 @@ +//Example 6.6:
+//Discrete Time Fourier Transform of
+clc;
+// DTS Signal
+N1 = 2;
+n = -N1:N1;
+x = ones(1,length(n));
+// Discrete-time Fourier Transform
+Wmax = 2*%pi;
+K = 4;
+k = 0:(K/1000):K;
+W = k*Wmax/K;
+XW = x* exp(-sqrt(-1)*n'*W);
+XW_Mag = real(XW);
+W = [-mtlb_fliplr(W), W(2:1001)]; // Omega from -Wmax to Wmax
+XW_Mag = [mtlb_fliplr(XW_Mag), XW_Mag(2:1001)];
+//plot for abs(a)<1
+figure
+subplot(2,1,1);
+a = gca();
+a.y_location ="origin";
+a.x_location ="origin";
+plot2d3('gnn',n,x);
+xtitle('Discrete Time Sequence x[n]')
+subplot(2,1,2);
+a = gca();
+a.y_location ="origin";
+a.x_location ="origin";
+plot2d(W,XW_Mag);
+title('Discrete Time Fourier Transform X(exp(jW))')
|