summaryrefslogtreecommitdiff
path: root/22/CH5/EX5.18/ch5ex18.sce
diff options
context:
space:
mode:
Diffstat (limited to '22/CH5/EX5.18/ch5ex18.sce')
-rwxr-xr-x22/CH5/EX5.18/ch5ex18.sce46
1 files changed, 46 insertions, 0 deletions
diff --git a/22/CH5/EX5.18/ch5ex18.sce b/22/CH5/EX5.18/ch5ex18.sce
new file mode 100755
index 000000000..cfb08de6d
--- /dev/null
+++ b/22/CH5/EX5.18/ch5ex18.sce
@@ -0,0 +1,46 @@
+//signals and systems
+//Inverse Z Transform:ROC |z|>2
+z = %z;
+syms n z1;//To find out Inverse z transform z must be linear z = z1
+X =-z*(z+0.4)/((z-0.8)*(z-2))
+X1 = denom(X);
+zp = roots(X1);
+X1 = -z1*(z1+0.4)/((z1-0.8)*(z1-2))
+F1 = X1*(z1^(n-1))*(z1-zp(1));
+F2 = X1*(z1^(n-1))*(z1-zp(2));
+h1 = limit(F1,z1,zp(1));
+disp(h1,'h1[n]=')
+h2 = limit(F2,z1,zp(2));
+disp(h2,'h2[n]=')
+h = h1+h2;
+disp(h,'h[n]=')
+
+//Inverse Z Transform:ROC 0.8<|z|<2
+z = %z;
+syms n z1;
+X =-z*(z+0.4)/((z-0.8)*(z-2))
+X1 = denom(X);
+zp = roots(X1);
+X1 = -z1*(z1+0.4)/((z1-0.8)*(z1-2))
+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-1)','h2[n]=')
+disp((h1)*'u(n)'-(h2)*'u(n-1)','h[n]=')
+
+//Inverse Z Transform:ROC |z|<0.8
+z = %z;
+syms n z1;
+X =-z*(z+0.4)/((z-0.8)*(z-2))
+X1 = denom(X);
+zp = roots(X1);
+X1 = -z1*(z1+0.4)/((z1-0.8)*(z1-2))
+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-1)','h1[n]=')
+h2 = limit(F2,z1,zp(2));
+disp((h2)*'u(-n-1)','h2[n]=')
+disp(-(h1)*'u(-n-1)'-(h2)*'u(-n-1)','h[n]=') \ No newline at end of file