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 /2279/CH4/EX4.30 | |
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 '2279/CH4/EX4.30')
-rwxr-xr-x | 2279/CH4/EX4.30/eg_4_30.sce | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/2279/CH4/EX4.30/eg_4_30.sce b/2279/CH4/EX4.30/eg_4_30.sce new file mode 100755 index 000000000..83912f6d8 --- /dev/null +++ b/2279/CH4/EX4.30/eg_4_30.sce @@ -0,0 +1,33 @@ +//Example 4.30
+//Cascade connection of systems
+clc
+clear
+n=0:10;
+h11=[1 -0.5];
+for i=1:length(n)
+ h2(i)=0.5^n(i);
+ if (n(i)==0) then
+ h1(i)=1;
+ elseif n(i)==1 then
+ h1(i)=-0.5
+ else
+ h1(i)=0;
+ end
+end
+h=convol(h11,h2);
+n2=0:11;
+//assume x[n]=[1 1 1]
+n1=0:2;
+x=[1 1 1];
+n3=0:13;
+y=convol(x,h);
+subplot(3,1,1);
+plot(n1,x,'.');
+xtitle("Input Signal x[n]","n","x[n]")
+subplot(3,1,2);
+plot(n2,h,'.');
+xtitle("Impulse Response h[n]","n","h[n]")
+subplot(3,1,3);
+plot(n3,y,'.');
+xtitle("Output Signal y[n]","n","y[n]")
+disp("the given system is an invertible system");
|