diff options
Diffstat (limited to '2279/CH4/EX4.26')
-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,'.');
|