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 /2294/CH4/EX4.8/EX4_8.sce | |
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 '2294/CH4/EX4.8/EX4_8.sce')
-rwxr-xr-x | 2294/CH4/EX4.8/EX4_8.sce | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/2294/CH4/EX4.8/EX4_8.sce b/2294/CH4/EX4.8/EX4_8.sce new file mode 100755 index 000000000..ebacd9f56 --- /dev/null +++ b/2294/CH4/EX4.8/EX4_8.sce @@ -0,0 +1,29 @@ +//Find the covolution Of the following signals.
+//Example 4.8
+clc;
+clear;
+close;
+t=-4:.01:4;
+for i=1:length(t)
+ if t(i)>=0 & t(i)<=2 then
+ x(i)=1;
+ else
+ x(i)=0;
+ end
+ if t(i)>=0 & t(i)<=3 then
+ h(i)=1;
+else
+ h(i)=0;
+end
+end
+y=convol(h,x);//Convolution of the above two signals is done.
+subplot(3,1,1);
+plot(t,h,'red');
+xtitle('input response 2','t','h[t]');
+subplot(3,1,2);
+plot(t,x,'blue');
+xtitle('input response 2','t','x[t]');
+subplot(3,1,3);
+t1=-8:.01:8;
+plot(t1,y,'green');
+xtitle('output response','t','y[t1]');
|