summaryrefslogtreecommitdiff
path: root/40/CH8/EX8.9b/Exa_8_9b.sce
diff options
context:
space:
mode:
authorpriyanka2015-06-24 15:03:17 +0530
committerpriyanka2015-06-24 15:03:17 +0530
commitb1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b (patch)
treeab291cffc65280e58ac82470ba63fbcca7805165 /40/CH8/EX8.9b/Exa_8_9b.sce
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 '40/CH8/EX8.9b/Exa_8_9b.sce')
-rwxr-xr-x40/CH8/EX8.9b/Exa_8_9b.sce15
1 files changed, 15 insertions, 0 deletions
diff --git a/40/CH8/EX8.9b/Exa_8_9b.sce b/40/CH8/EX8.9b/Exa_8_9b.sce
new file mode 100755
index 000000000..d32e7094c
--- /dev/null
+++ b/40/CH8/EX8.9b/Exa_8_9b.sce
@@ -0,0 +1,15 @@
+//DFT and DFS of sinusoids
+n2=0:1/1280:31/128;
+xt=4*sin(72*%pi*n2');
+n=0:1/128:31/128;//F=9/32 hence N=32
+xn=4*sin(72*%pi*n');
+XDFT=abs(dft(xn,-1));
+n1=0:31;
+a=gca();
+a.x_location="origin";
+plot2d(n2,xt);
+plot2d3('gnn',n,xn);
+xset('window',1);
+b=gca();
+b.x_location="origin";
+plot2d3('gnn',n1,XDFT);