summaryrefslogtreecommitdiff
path: root/2279/CH4/EX4.2/Ex4_2.sce
blob: 573c7465b6c0c9fe5f73e40241fe4e19d91c4bf7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
//Example 4.2
//Convolution sum of x[n] and h[n]
clc
clear
n=-1:1;
n1=-2:2;
x=[0.5 0.5 0.5];
h=[3 2 1];
y=coeff(poly(h,'z','c')*poly(x,'z','c'))
disp("Convolution of x[n] and h[n] is...")
disp(y)