summaryrefslogtreecommitdiff
path: root/125/CH3/EX3.13/Example3_13.sce
blob: ca2adb2e5d95bee1b6303fcc28a5bf8be3dc35c4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
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.  
//