diff options
author | priyanka | 2015-06-24 15:03:17 +0530 |
---|---|---|
committer | priyanka | 2015-06-24 15:03:17 +0530 |
commit | b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b (patch) | |
tree | ab291cffc65280e58ac82470ba63fbcca7805165 /62/CH2/EX2.8 | |
download | Scilab-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.8')
-rwxr-xr-x | 62/CH2/EX2.8/ex_2_8.sce | 40 | ||||
-rwxr-xr-x | 62/CH2/EX2.8/ex_2_8_1.png | bin | 0 -> 10765 bytes | |||
-rwxr-xr-x | 62/CH2/EX2.8/ex_2_8_2.png | bin | 0 -> 10244 bytes |
3 files changed, 40 insertions, 0 deletions
diff --git a/62/CH2/EX2.8/ex_2_8.sce b/62/CH2/EX2.8/ex_2_8.sce new file mode 100755 index 000000000..17b6f4c74 --- /dev/null +++ b/62/CH2/EX2.8/ex_2_8.sce @@ -0,0 +1,40 @@ +//Example 2.8:Convolution Integral
+clear;
+close;
+clc;
+t =-4*10:1/100:4*10;
+t2=-4:1/100:0;
+for i=1:length(t2)
+ if t2(i)<-2 then
+ x(i)=1;
+ else
+ x(i)=0;
+ end
+end
+fac=ceil(length(t)/length(t2));
+s=[];
+for i=1:fac;
+ s=[s ;x];
+end
+y = convol(s,s)./2000;
+figure
+a=gca();
+a.x_location="origin";
+a.y_location="origin";
+b=find(t==8);
+c=find(t==-8);
+plot2d(t(c:b),s(c:b))
+xtitle('Input Response','t','x(t)');
+a.children.children.thickness = 3;
+a.children.children.foreground= 2;
+figure
+a=gca();
+t1=-8*10:1/100:8*10;
+a.y_location="origin";
+a.x_location="origin";
+b=find(t1==8);
+c=find(t1==-8);
+plot2d(t1(c:b),y(c:b))
+xtitle('Output Response','t','y(t)');
+a.children.children.thickness = 3;
+a.children.children.foreground= 2;
\ No newline at end of file diff --git a/62/CH2/EX2.8/ex_2_8_1.png b/62/CH2/EX2.8/ex_2_8_1.png Binary files differnew file mode 100755 index 000000000..c0a641711 --- /dev/null +++ b/62/CH2/EX2.8/ex_2_8_1.png diff --git a/62/CH2/EX2.8/ex_2_8_2.png b/62/CH2/EX2.8/ex_2_8_2.png Binary files differnew file mode 100755 index 000000000..7b3d64a0b --- /dev/null +++ b/62/CH2/EX2.8/ex_2_8_2.png |