summaryrefslogtreecommitdiff
path: root/1592/CH2/EX2.37/example_2_37.sce
diff options
context:
space:
mode:
authorpriyanka2015-06-24 15:03:17 +0530
committerpriyanka2015-06-24 15:03:17 +0530
commitb1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b (patch)
treeab291cffc65280e58ac82470ba63fbcca7805165 /1592/CH2/EX2.37/example_2_37.sce
downloadScilab-TBC-Uploads-b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b.tar.gz
Scilab-TBC-Uploads-b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b.tar.bz2
Scilab-TBC-Uploads-b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b.zip
initial commit / add all books
Diffstat (limited to '1592/CH2/EX2.37/example_2_37.sce')
-rwxr-xr-x1592/CH2/EX2.37/example_2_37.sce24
1 files changed, 24 insertions, 0 deletions
diff --git a/1592/CH2/EX2.37/example_2_37.sce b/1592/CH2/EX2.37/example_2_37.sce
new file mode 100755
index 000000000..6ae95d033
--- /dev/null
+++ b/1592/CH2/EX2.37/example_2_37.sce
@@ -0,0 +1,24 @@
+//Scilab Code for Example 2.37 of Signals and systems by
+//P.Ramakrishna Rao
+//Inverse Z Transform:ROC 1<|z|<2
+clear;
+clc;
+z = %z;
+syms n z1;
+//To find out Inverse z transform z must be linear z = z1
+X =(z*(z^2-z+1))/((z-0.5)*(z-2)*(z-1))
+X1 = denom(X);
+zp = roots(X1);
+X1 = (z1*(z1^2-z1+1))/((z1-0.5)*(z1-2)*(z1-1))
+F1 = X1*(z1^(n-1))*(z1-zp(1))
+F2 = X1*(z1^(n-1))*(z1-zp(2))
+F3 = X1*(z1^(n-1))*(z1-zp(3))
+h1 = limit(F1,z1,zp(1));
+disp(h1*'u(-n-1)','h1[n]=')
+h2 = limit(F2,z1,zp(2));
+disp((h2)*'u(n)','h2[n]=')
+h3 = limit(F3,z1,zp(3));
+disp((h3)*'u(n)','h3[n]=')
+disp((h3)*'u(n)'+(h2)*'u(n)'-(h1)*'u(-n-1)','h[n]=')
+////Result
+// h[n]=1* 0.5 ^n *u(n) - 2*u(n) - 2* 2^n *u(- n - 1)