summaryrefslogtreecommitdiff
path: root/1592/CH2/EX2.40
diff options
context:
space:
mode:
Diffstat (limited to '1592/CH2/EX2.40')
-rwxr-xr-x1592/CH2/EX2.40/Example_2_40.sce21
1 files changed, 21 insertions, 0 deletions
diff --git a/1592/CH2/EX2.40/Example_2_40.sce b/1592/CH2/EX2.40/Example_2_40.sce
new file mode 100755
index 000000000..2a1c0c7fe
--- /dev/null
+++ b/1592/CH2/EX2.40/Example_2_40.sce
@@ -0,0 +1,21 @@
+//Scilab Code for Example 2.40 of Signals and systems by
+//P.Ramakrishna Rao
+//Inverse Z Transform:ROC |z|>2
+clear;
+clc;
+z = %z;
+syms n z1;
+//To find out Inverse z transform z must be linear z = z1
+X =z^2/((z-0.5)*(z-1));
+X1 = denom(X);
+zp = roots(X1)
+X1 = z1^2/((z1-0.5)*(z1-1));
+F1 = X1*(z1^(n-1))*(z1-zp(1));
+F2 = X1*(z1^(n-1))*(z1-zp(2));
+h1 = limit(F1,z1,zp(1));
+disp(h1*'u(n)','h1[n]=')
+h2 = limit(F2,z1,zp(2));
+disp((h2)*'u(n)','h2[n]=');
+disp(-(h1)*'u(-n-1)'-(h2)*'u(-n-1)','h[n]=');
+////Result
+// h[n]= ((0.5)^n - 2)*u(-n-1)