diff options
author | prashantsinalkar | 2017-10-10 12:27:19 +0530 |
---|---|---|
committer | prashantsinalkar | 2017-10-10 12:27:19 +0530 |
commit | 7f60ea012dd2524dae921a2a35adbf7ef21f2bb6 (patch) | |
tree | dbb9e3ddb5fc829e7c5c7e6be99b2c4ba356132c /2279/CH4/EX4.26/Ex4_26.sce | |
parent | b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b (diff) | |
download | Scilab-TBC-Uploads-7f60ea012dd2524dae921a2a35adbf7ef21f2bb6.tar.gz Scilab-TBC-Uploads-7f60ea012dd2524dae921a2a35adbf7ef21f2bb6.tar.bz2 Scilab-TBC-Uploads-7f60ea012dd2524dae921a2a35adbf7ef21f2bb6.zip |
initial commit / add all books
Diffstat (limited to '2279/CH4/EX4.26/Ex4_26.sce')
-rw-r--r-- | 2279/CH4/EX4.26/Ex4_26.sce | 52 |
1 files changed, 52 insertions, 0 deletions
diff --git a/2279/CH4/EX4.26/Ex4_26.sce b/2279/CH4/EX4.26/Ex4_26.sce new file mode 100644 index 000000000..0b55d5c1b --- /dev/null +++ b/2279/CH4/EX4.26/Ex4_26.sce @@ -0,0 +1,52 @@ +//Interconnectiuion of LTI systems
+n=-10:10;
+for i=1:length(n)
+ if(n(i)==0)
+ h1(i)=2;
+ else
+ h1(i)=1;
+ end
+end
+for i=1:length(n)
+ if(n(i)==2)
+ h2(i)=1;
+ else
+ h2(i)=0;
+ end
+end
+for i=1:length(n)
+ if(n(i)>=1)
+ h3(i)=1;
+ else
+ h3(i)=0;
+end
+end
+for i=1:length(n)
+ if(n(i)>= -1)
+ h4(i)=1;
+ else
+ h4(i)=0;
+ end
+end
+for i=1:length(n)
+ h5(i)=n(i);
+ h6(i)=1;
+end
+h23=h2.*h3;
+h234=h4+h23;
+h1234=h1.*h234;
+h56=h5.*h6;
+h=h56+h1234;
+x=[1 -0.5];
+n1=[0 1];
+y=convol(x,h);
+n2=-10:11;
+subplot(3,1,1)
+xtitle("input signal x(n)","....................n","x[n]");
+plot(n1,x,'.');
+subplot(3,1,2)
+xtitle("system response h(n)","....................n","h[n]");
+plot(n,h,'.');
+subplot(3,1,3)
+xtitle("output signal y(n)",".............................n","y[n]");
+plot(n2,y,'.');
|