From b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b Mon Sep 17 00:00:00 2001 From: priyanka Date: Wed, 24 Jun 2015 15:03:17 +0530 Subject: initial commit / add all books --- 125/CH3/EX3.1/Example3_1.sce | 17 +++++++++++++++++ 125/CH3/EX3.11/Example3_11.sce | 15 +++++++++++++++ 125/CH3/EX3.12/Example3_12.sce | 16 ++++++++++++++++ 125/CH3/EX3.13/Example3_13.sce | 23 +++++++++++++++++++++++ 125/CH3/EX3.14/Example3_14.sce | 16 ++++++++++++++++ 125/CH3/EX3.15/Example3_15.sce | 18 ++++++++++++++++++ 125/CH3/EX3.16/Example3_16.sce | 18 ++++++++++++++++++ 125/CH3/EX3.17/Example3_17.sce | 15 +++++++++++++++ 125/CH3/EX3.18/Example3_18.sce | 16 ++++++++++++++++ 125/CH3/EX3.2/Example3_2.sce | 17 +++++++++++++++++ 125/CH3/EX3.3/Example3_3.sce | 14 ++++++++++++++ 125/CH3/EX3.7/Example3_7.sce | 15 +++++++++++++++ 125/CH3/EX3.8/Example3_8.sce | 15 +++++++++++++++ 13 files changed, 215 insertions(+) create mode 100755 125/CH3/EX3.1/Example3_1.sce create mode 100755 125/CH3/EX3.11/Example3_11.sce create mode 100755 125/CH3/EX3.12/Example3_12.sce create mode 100755 125/CH3/EX3.13/Example3_13.sce create mode 100755 125/CH3/EX3.14/Example3_14.sce create mode 100755 125/CH3/EX3.15/Example3_15.sce create mode 100755 125/CH3/EX3.16/Example3_16.sce create mode 100755 125/CH3/EX3.17/Example3_17.sce create mode 100755 125/CH3/EX3.18/Example3_18.sce create mode 100755 125/CH3/EX3.2/Example3_2.sce create mode 100755 125/CH3/EX3.3/Example3_3.sce create mode 100755 125/CH3/EX3.7/Example3_7.sce create mode 100755 125/CH3/EX3.8/Example3_8.sce (limited to '125/CH3') diff --git a/125/CH3/EX3.1/Example3_1.sce b/125/CH3/EX3.1/Example3_1.sce new file mode 100755 index 000000000..aab5c7ac9 --- /dev/null +++ b/125/CH3/EX3.1/Example3_1.sce @@ -0,0 +1,17 @@ +//Caption: 2-D Linear Convolution +//Example3.1 & Example3.4 +//page 85 & page 107 +clc; +x =[4,5,6;7,8,9]; +h = [1;1;1]; +disp(x,'x=') +disp(h,'h=') +[y,X,H] = conv2d2(x,h); +disp(y,'Linear 2D convolution result y =') +//Result +//Linear 2D convolution result y = +// +// 4. 5. 6. +// 11. 13. 15. +// 11. 13. 15. +// 7. 8. 9. \ No newline at end of file diff --git a/125/CH3/EX3.11/Example3_11.sce b/125/CH3/EX3.11/Example3_11.sce new file mode 100755 index 000000000..da378fd02 --- /dev/null +++ b/125/CH3/EX3.11/Example3_11.sce @@ -0,0 +1,15 @@ +//Caption: Linear COnvolution of any signal with an impulse signal gives +//rise to the same signal +//Example3.11 +//page 121 +clc; +x =[1,2;3,4]; +h = 1; +y = conv2d2(x,h); +disp(y,'Linear 2D convolution result y =') +//Result +//Linear 2D convolution result y = +//// Linear 2D convolution result y = +// +// 1. 2. +// 3. 4. diff --git a/125/CH3/EX3.12/Example3_12.sce b/125/CH3/EX3.12/Example3_12.sce new file mode 100755 index 000000000..ce7187465 --- /dev/null +++ b/125/CH3/EX3.12/Example3_12.sce @@ -0,0 +1,16 @@ +//Caption: Circular Convolution between two 2D matrices +//Example3.12 +//page 122 +clc; +x = [1,2;3,4]; +h = [5,6;7,8]; +X = fft2d(x); //2D FFT of x matrix +H = fft2d(h); //2D FFT of h matrix +Y = X.*H; //Element by Element multiplication +y = ifft2d(Y); +disp(y,'Circular Convolution Result y =') +//Result +//Circular Convolution Result y = +// +// 70. 68. +// 62. 60. \ No newline at end of file diff --git a/125/CH3/EX3.13/Example3_13.sce b/125/CH3/EX3.13/Example3_13.sce new file mode 100755 index 000000000..ca2adb2e5 --- /dev/null +++ b/125/CH3/EX3.13/Example3_13.sce @@ -0,0 +1,23 @@ +//Caption: Circular Convolution expressed as linear convolution plus alias +//Example3.13 +//page 123 +clc; +x = [1,2;3,4]; +h = [5,6;7,8]; +y = conv2d(x,h); +y1 = [y(:,1)+y(:,$),y(:,2)]; +y2 = [y1(1,:)+y1($,:);y1(2,:)] +disp(y,'Linear Convolution result y=') +disp(y2,'circular convolution expessed as linear convolution plus alias =') +//Result +// Linear Convolution result y= +// +// 5. 16. 12. +// 22. 60. 40. +// 21. 52. 32. +// +// circular convolution expessed as linear convolution plus alias = +// +// 70. 68. +// 62. 60. +// \ No newline at end of file diff --git a/125/CH3/EX3.14/Example3_14.sce b/125/CH3/EX3.14/Example3_14.sce new file mode 100755 index 000000000..40b848a71 --- /dev/null +++ b/125/CH3/EX3.14/Example3_14.sce @@ -0,0 +1,16 @@ +//Caption: linear cross correlation of a 2D matrix +//Example3.14 +//page 129 +clc; +x = [3,1;2,4]; +h1 = [1,5;2,3]; +h2 = h1(:,$:-1:1); +h = h2($:-1:1,:); +y = conv2d(x,h) +disp(y,'Linear cross Correlation result y=') +//Result +//Linear cross Correlation result y= +// +// 9. 9. 2. +// 21. 24. 9. +// 10. 22. 4. \ No newline at end of file diff --git a/125/CH3/EX3.15/Example3_15.sce b/125/CH3/EX3.15/Example3_15.sce new file mode 100755 index 000000000..08afb469f --- /dev/null +++ b/125/CH3/EX3.15/Example3_15.sce @@ -0,0 +1,18 @@ +//Caption: Circular correlation between two signals +//Example3.15 +//page 131 +clc; +x = [1,5;2,4]; +h = [3,2;4,1]; +h = h(:,$:-1:1); +h = h($:-1:1,:); +X = fft2d(x); +H = fft2d(h); +Y = X.*H; +y = ifft2d(Y); +disp(y,'Circular Correlation result y=') +//Result +//Circular Correlation result y= +// +// 37. 23. +// 35. 25. \ No newline at end of file diff --git a/125/CH3/EX3.16/Example3_16.sce b/125/CH3/EX3.16/Example3_16.sce new file mode 100755 index 000000000..f4808115b --- /dev/null +++ b/125/CH3/EX3.16/Example3_16.sce @@ -0,0 +1,18 @@ +//Caption: Circular correlation between two signals +//Example3.16 +//page 134 +clc; +x = [5,10;15,20]; +h = [3,6;9,12]; +h = h(:,$:-1:1); +h = h($:-1:1,:); +X = fft2d(x); +H = fft2d(h); +Y = X.*H; +y = ifft2d(Y); +disp(y,'Circular Correlation result y=') +//Result +// Circular Correlation result y= +// +// 300. 330. +// 420. 450. diff --git a/125/CH3/EX3.17/Example3_17.sce b/125/CH3/EX3.17/Example3_17.sce new file mode 100755 index 000000000..9fb14bbc6 --- /dev/null +++ b/125/CH3/EX3.17/Example3_17.sce @@ -0,0 +1,15 @@ +//Caption: linear auto correlation of a 2D matrix +//Example3.17 +//page 136 +clc; +x1 = [1,1;1,1]; +x2 = x1(:,$:-1:1); +x2 = x2($:-1:1,:); +x = conv2d(x1,x2) +disp(x,'Linear auto Correlation result x=') +//Result +//Linear auto Correlation result x= +// +// 1. 2. 1. +// 2. 4. 2. +// 1. 2. 1. \ No newline at end of file diff --git a/125/CH3/EX3.18/Example3_18.sce b/125/CH3/EX3.18/Example3_18.sce new file mode 100755 index 000000000..cf32ef020 --- /dev/null +++ b/125/CH3/EX3.18/Example3_18.sce @@ -0,0 +1,16 @@ +//Caption: linear cross correlation of a 2D matrix +//Example3.18 +//page 141 +clc; +x = [1,1;1,1]; +h1 = [1,2;3,4]; +h2 = h1(:,$:-1:1); +h = h2($:-1:1,:); +y = conv2d(x,h) +disp(y,'Linear cross Correlation result y=') +//Result +//Linear cross Correlation result y= +// +// 4. 7. 3. +// 6. 10. 4. +// 2. 3. 1. \ No newline at end of file diff --git a/125/CH3/EX3.2/Example3_2.sce b/125/CH3/EX3.2/Example3_2.sce new file mode 100755 index 000000000..3a35beae6 --- /dev/null +++ b/125/CH3/EX3.2/Example3_2.sce @@ -0,0 +1,17 @@ +//Caption: 2-D Linear Convolution +//Example3.2 & Example3.5 & Example3.9 +//page 91 & page 108 & page 116 +clc; +x =[1,2,3;4,5,6;7,8,9]; +h = [1,1;1,1;1,1]; +y = conv2d2(x,h); +disp(y,'Linear 2D convolution result y =') +//Result +// Linear 2D convolution result y = +// +// 1. 3. 5. 3. +// 5. 12. 16. 9. +// 12. 27. 33. 18. +// 11. 24. 28. 15. +// 7. 15. 17. 9. +// \ No newline at end of file diff --git a/125/CH3/EX3.3/Example3_3.sce b/125/CH3/EX3.3/Example3_3.sce new file mode 100755 index 000000000..b7e620e54 --- /dev/null +++ b/125/CH3/EX3.3/Example3_3.sce @@ -0,0 +1,14 @@ +//Caption: 2-D Linear Convolution +//Example3.3 & Example3.6 & Example3.10 +//page 100 & page 109 & page 119 +clc; +x =[1,2,3;4,5,6;7,8,9]; +h = [3,4,5]; +y = conv2d2(x,h); +disp(y,'Linear 2D convolution result y =') +//Result +//Linear 2D convolution result y = +// +// 3. 10. 22. 22. 15. +// 12. 31. 58. 49. 30. +// 21. 52. 94. 76. 45. \ No newline at end of file diff --git a/125/CH3/EX3.7/Example3_7.sce b/125/CH3/EX3.7/Example3_7.sce new file mode 100755 index 000000000..a7a75891c --- /dev/null +++ b/125/CH3/EX3.7/Example3_7.sce @@ -0,0 +1,15 @@ +//Caption: 2-D Linear Convolution +//Example3.7 +//page 111 +clc; +x =[1,2;3,4]; +h = [5,6;7,8]; +y = conv2d2(x,h); +disp(y,'Linear 2D convolution result y =') +//Result +// Linear 2D convolution result y = +//Linear 2D convolution result y = +// +// 5. 16. 12. +// 22. 60. 40. +// 21. 52. 32 \ No newline at end of file diff --git a/125/CH3/EX3.8/Example3_8.sce b/125/CH3/EX3.8/Example3_8.sce new file mode 100755 index 000000000..39d74b048 --- /dev/null +++ b/125/CH3/EX3.8/Example3_8.sce @@ -0,0 +1,15 @@ +//Caption: 2-D Linear Convolution +//Example3.8 +//page 113 +clc; +x =[1,2,3;4,5,6;7,8,9]; +h = [1;1;1]; +y = conv2d2(x,h); +disp(y,'Linear 2D convolution result y =') +//Result +// Linear 2D convolution result y = +//// 1. 2. 3. +// 5. 7. 9. +// 12. 15. 18. +// 11. 13. 15. +// 7. 8. 9. -- cgit