diff options
Diffstat (limited to '67/CH2/EX2.6')
-rwxr-xr-x | 67/CH2/EX2.6/example26.sce | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/67/CH2/EX2.6/example26.sce b/67/CH2/EX2.6/example26.sce new file mode 100755 index 000000000..c698b7ffa --- /dev/null +++ b/67/CH2/EX2.6/example26.sce @@ -0,0 +1,24 @@ +//Example 2.6
+clc;
+t=-8:1/100:8;
+for i=1:length(t)
+ if t(i)<0 then
+ x(i)=exp(2.*t(i));
+ h(i)=0;
+ else
+ x(i)=0;
+ h(i)=1;
+ end
+end
+t1=t+3;
+y=convol(x,h);
+figure
+plot2d(t1,h);
+title('Impulse responce');
+figure
+plot2d(t,x);
+title('Input signal');
+figure
+t2=-16:1/100:16
+plot2d(t2,y);
+title('Output signal');
\ No newline at end of file |