summaryrefslogtreecommitdiff
path: root/62/CH2/EX2.5
diff options
context:
space:
mode:
authorpriyanka2015-06-24 15:03:17 +0530
committerpriyanka2015-06-24 15:03:17 +0530
commitb1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b (patch)
treeab291cffc65280e58ac82470ba63fbcca7805165 /62/CH2/EX2.5
downloadScilab-TBC-Uploads-b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b.tar.gz
Scilab-TBC-Uploads-b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b.tar.bz2
Scilab-TBC-Uploads-b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b.zip
initial commit / add all books
Diffstat (limited to '62/CH2/EX2.5')
-rwxr-xr-x62/CH2/EX2.5/ex_2_5.pngbin0 -> 32769 bytes
-rwxr-xr-x62/CH2/EX2.5/ex_2_5.sce33
2 files changed, 33 insertions, 0 deletions
diff --git a/62/CH2/EX2.5/ex_2_5.png b/62/CH2/EX2.5/ex_2_5.png
new file mode 100755
index 000000000..b030be62b
--- /dev/null
+++ b/62/CH2/EX2.5/ex_2_5.png
Binary files differ
diff --git a/62/CH2/EX2.5/ex_2_5.sce b/62/CH2/EX2.5/ex_2_5.sce
new file mode 100755
index 000000000..3dedb04ec
--- /dev/null
+++ b/62/CH2/EX2.5/ex_2_5.sce
@@ -0,0 +1,33 @@
+//Example 2.4:Convolution Integral
+clear;
+close;
+clc;
+t =-5:1/100:5;
+for i=1:length(t)
+ if t(i)<0 then
+ h(i)=0;
+ x(i)=exp(t(i));
+ else
+ h(i)=exp(-t(i));
+ x(i)=0;
+ end
+end
+y = convol(x,h)./100;
+figure
+a=gca();
+a.x_location="origin";
+plot2d(t,h)
+xtitle('Impulse Response','t','h(t)');
+a.thickness = 2;
+figure
+a=gca();
+plot2d(t,x)
+xtitle('Input Response','t','x(t)');
+a.thickness = 2;
+figure
+a=gca();
+t1=-10:1/100:10;
+a.y_location="origin";
+plot2d(t1,y)
+xtitle('Output Response','t','y(t)');
+a.thickness = 2;