summaryrefslogtreecommitdiff
path: root/692/CH5/EX5.11
diff options
context:
space:
mode:
authorpriyanka2015-06-24 15:03:17 +0530
committerpriyanka2015-06-24 15:03:17 +0530
commitb1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b (patch)
treeab291cffc65280e58ac82470ba63fbcca7805165 /692/CH5/EX5.11
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 '692/CH5/EX5.11')
-rwxr-xr-x692/CH5/EX5.11/P5_11.sce22
1 files changed, 22 insertions, 0 deletions
diff --git a/692/CH5/EX5.11/P5_11.sce b/692/CH5/EX5.11/P5_11.sce
new file mode 100755
index 000000000..43a41dcae
--- /dev/null
+++ b/692/CH5/EX5.11/P5_11.sce
@@ -0,0 +1,22 @@
+//EXAMPLE 5.11
+//Circular convolution using DFT
+clc;
+clear;
+g = [1 2 0 1];
+disp(g,'g[n] = ');
+h = [2 2 1 1];
+disp(h,'h[n] = ');
+M=4;
+for n=0:M-1
+ for k=0:M-1
+ W(n+1,k+1) = exp(-(%i*2*%pi*k/M)*n);
+ end
+ end
+ G = W*g';
+ H = W*h';
+disp(G,'DFT is, G = ');
+disp(H,'DFT is, H = ');
+
+Y=G.*H;
+y=(1/4)*conj(W)*(Y);
+disp(real(y),'Circular convolution = '); \ No newline at end of file