summaryrefslogtreecommitdiff
path: root/2279/CH4/EX4.2/Ex4_2.sce
diff options
context:
space:
mode:
Diffstat (limited to '2279/CH4/EX4.2/Ex4_2.sce')
-rw-r--r--2279/CH4/EX4.2/Ex4_2.sce12
1 files changed, 12 insertions, 0 deletions
diff --git a/2279/CH4/EX4.2/Ex4_2.sce b/2279/CH4/EX4.2/Ex4_2.sce
new file mode 100644
index 000000000..573c7465b
--- /dev/null
+++ b/2279/CH4/EX4.2/Ex4_2.sce
@@ -0,0 +1,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)
+