summaryrefslogtreecommitdiff
path: root/2279/CH7/EX7.19
diff options
context:
space:
mode:
authorpriyanka2015-06-24 15:03:17 +0530
committerpriyanka2015-06-24 15:03:17 +0530
commitb1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b (patch)
treeab291cffc65280e58ac82470ba63fbcca7805165 /2279/CH7/EX7.19
downloadScilab-TBC-Uploads-b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b.tar.gz
Scilab-TBC-Uploads-b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b.tar.bz2
Scilab-TBC-Uploads-b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b.zip
initial commit / add all books
Diffstat (limited to '2279/CH7/EX7.19')
-rwxr-xr-x2279/CH7/EX7.19/eg_7_19.sce25
1 files changed, 25 insertions, 0 deletions
diff --git a/2279/CH7/EX7.19/eg_7_19.sce b/2279/CH7/EX7.19/eg_7_19.sce
new file mode 100755
index 000000000..0792030fc
--- /dev/null
+++ b/2279/CH7/EX7.19/eg_7_19.sce
@@ -0,0 +1,25 @@
+//Discrete Time Fourier Transform of
+//x[n]= 1 , abs(n)<=M1
+clear;
+clc;
+close;
+// DTS Signal
+M1 = 2;
+n = -M1:M1;
+x = ones(1,length(n));
+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,2);
+xtitle('Discrete Time Sequence x[n]','n','x[n]')
+subplot(2,1,2);
+plot2d(W,XW_Mag);
+xtitle('Discrete Time Fourier Transform X(exp(jW))','w','|X(exp(jW))|)