summaryrefslogtreecommitdiff
path: root/2294/CH8/EX8.28/EX8_28.sce
blob: 8821bc42c7b535a8fdd6d6ed4c17fac97f342803 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16

//Example 8.28
//Find the linear and circular convolution
clc;
clear all;
x1=[1 2 3 4];
x2=[2 3 4 1];
//Linear convolution
z=convol(x1,x2);
disp(z,'The linear convolution is:');
//To obtain circular convolution
X1=fft(x1,-1);
X2=fft(x2,-1);
X3=X1.*X2;
x3=fft(X3,1);
disp(x3,'The circular convolution is:');