diff options
Diffstat (limited to '125/DEPENDENCIES/conv2d2.sce')
-rwxr-xr-x | 125/DEPENDENCIES/conv2d2.sce | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/125/DEPENDENCIES/conv2d2.sce b/125/DEPENDENCIES/conv2d2.sce new file mode 100755 index 000000000..37350beba --- /dev/null +++ b/125/DEPENDENCIES/conv2d2.sce @@ -0,0 +1,23 @@ +function [y,X,H] = conv2d2(x,h)
+
+[x1,x2] = size(x);
+[h1,h2] = size(h);
+X = zeros(x1+h1-1,x2+h2-1);
+H = zeros(x1+h1-1,x2+h2-1);
+Y = zeros(x1+h1-1,x2+h2-1);
+for i = 1:x1
+ for j = 1:x2
+ X(i,j)=x(i,j);
+ end
+end
+for i =1:h1
+ for j = 1:h2
+ H(i,j)=h(i,j);
+ end
+end
+disp(X,'x=')
+disp(H,'h =')
+Y = fft2d(X).*fft2d(H);
+disp(Y)
+y = ifft2d(Y);
+endfunction
\ No newline at end of file |