diff options
author | prashantsinalkar | 2017-10-10 12:27:19 +0530 |
---|---|---|
committer | prashantsinalkar | 2017-10-10 12:27:19 +0530 |
commit | 7f60ea012dd2524dae921a2a35adbf7ef21f2bb6 (patch) | |
tree | dbb9e3ddb5fc829e7c5c7e6be99b2c4ba356132c /2279/CH7/EX7.18 | |
parent | b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b (diff) | |
download | Scilab-TBC-Uploads-7f60ea012dd2524dae921a2a35adbf7ef21f2bb6.tar.gz Scilab-TBC-Uploads-7f60ea012dd2524dae921a2a35adbf7ef21f2bb6.tar.bz2 Scilab-TBC-Uploads-7f60ea012dd2524dae921a2a35adbf7ef21f2bb6.zip |
initial commit / add all books
Diffstat (limited to '2279/CH7/EX7.18')
-rw-r--r-- | 2279/CH7/EX7.18/Ex7_18.sce | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/2279/CH7/EX7.18/Ex7_18.sce b/2279/CH7/EX7.18/Ex7_18.sce new file mode 100644 index 000000000..de4954a80 --- /dev/null +++ b/2279/CH7/EX7.18/Ex7_18.sce @@ -0,0 +1,27 @@ +//Discrete Time Fourier Transform of
+//x[n]= (a^abs(n)) |a|<1
+clear;
+clc;
+close;
+// DTS Signal
+a = 0.5;
+max_limit = 10;
+n = -max_limit+1:max_limit-1;
+x = a^abs(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);
+plot2d3('gnn',n,x);
+xtitle('Discrete Time Sequence x[n] for a>0','n','x[n]')
+subplot(2,1,2);
+plot2d(W,XW_Mag);
+xtitle('Discrete Time Fourier Transform X(exp(jW))','w','|X(exp(jW))|')
|