diff options
Diffstat (limited to '3812/CH2/EX2.17/2_17.sce')
-rw-r--r-- | 3812/CH2/EX2.17/2_17.sce | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/3812/CH2/EX2.17/2_17.sce b/3812/CH2/EX2.17/2_17.sce new file mode 100644 index 000000000..4d1910fe4 --- /dev/null +++ b/3812/CH2/EX2.17/2_17.sce @@ -0,0 +1,27 @@ +//Example 2_17
+//find convolution of two sequences
+clc;
+n=-8:1/1000:8;
+for i=1:length(n)
+if n(i)<-5 then
+x(i)=0;
+else
+x(i)=(1/2)^n(i);
+end
+if n(i)<3 then
+h(i)=0;
+else
+h(i)=(1/3)^n(i);
+end
+end
+y=convol(x,h);
+figure
+plot2d3(n,h);
+title('Impulse responce');
+figure
+plot2d3(n,x);
+title('Input signal');
+figure
+n1=-16:1/1000:16
+plot2d3(n1,y);
+title('Output signal');
|