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 /22/CH5 | |
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 '22/CH5')
-rwxr-xr-x | 22/CH5/EX5.1/ch5ex1.jpg | bin | 0 -> 17453 bytes | |||
-rwxr-xr-x | 22/CH5/EX5.1/ch5ex1.sce | 10 | ||||
-rwxr-xr-x | 22/CH5/EX5.10/ch5ex10.jpg | bin | 0 -> 20719 bytes | |||
-rwxr-xr-x | 22/CH5/EX5.10/ch5ex10.sce | 10 | ||||
-rwxr-xr-x | 22/CH5/EX5.12/ch5ex12.sce | 5 | ||||
-rwxr-xr-x | 22/CH5/EX5.13/ch5ex13.sce | 5 | ||||
-rwxr-xr-x | 22/CH5/EX5.17/ch5ex17.sce | 12 | ||||
-rwxr-xr-x | 22/CH5/EX5.18/ch5ex18.sce | 46 | ||||
-rwxr-xr-x | 22/CH5/EX5.19/ch5ex19.sce | 19 | ||||
-rwxr-xr-x | 22/CH5/EX5.2/ch5ex2.sce | 29 | ||||
-rwxr-xr-x | 22/CH5/EX5.20/ch5ex20.sce | 23 | ||||
-rwxr-xr-x | 22/CH5/EX5.3.a/ch5ex3a.sce | 16 | ||||
-rwxr-xr-x | 22/CH5/EX5.3.c/ch5ex3c.sce | 16 | ||||
-rwxr-xr-x | 22/CH5/EX5.5/ch5ex5.sce | 19 | ||||
-rwxr-xr-x | 22/CH5/EX5.6/ch5ex6.sce | 19 |
15 files changed, 229 insertions, 0 deletions
diff --git a/22/CH5/EX5.1/ch5ex1.jpg b/22/CH5/EX5.1/ch5ex1.jpg Binary files differnew file mode 100755 index 000000000..483e7bdd1 --- /dev/null +++ b/22/CH5/EX5.1/ch5ex1.jpg diff --git a/22/CH5/EX5.1/ch5ex1.sce b/22/CH5/EX5.1/ch5ex1.sce new file mode 100755 index 000000000..ca9d2c11d --- /dev/null +++ b/22/CH5/EX5.1/ch5ex1.sce @@ -0,0 +1,10 @@ +//signals and systems
+// Ztransform of x[n] = (a)^n.u[n]
+syms n z;
+a = 0.5;
+x =(a)^n;
+n1=0:10;
+plot2d3(n1,a^n1); xtitle('a^n','n');
+plot(n1,a^n1,'r.')
+X = symsum(x*(z^(-n)),n,0,%inf)
+disp(X,"ans=")
\ No newline at end of file diff --git a/22/CH5/EX5.10/ch5ex10.jpg b/22/CH5/EX5.10/ch5ex10.jpg Binary files differnew file mode 100755 index 000000000..1da11eb02 --- /dev/null +++ b/22/CH5/EX5.10/ch5ex10.jpg diff --git a/22/CH5/EX5.10/ch5ex10.sce b/22/CH5/EX5.10/ch5ex10.sce new file mode 100755 index 000000000..648263714 --- /dev/null +++ b/22/CH5/EX5.10/ch5ex10.sce @@ -0,0 +1,10 @@ +omega= linspace(-%pi,%pi,106);
+H= syslin('c',(s/(s-0.8)));
+H_omega= squeeze(calfrq(H,0.01,10));
+size(H_omega)
+subplot(2,1,1); plot2d(omega, abs(H_omega));
+//xlabel('\omega');
+//ylabel('|H[e^{j\omega}]|');
+subplot(2,1,2); plot2d(omega,atan(imag(H_omega),real(H_omega))*180/%pi);
+//xlabel('\omega');
+//ylabel('\angle H[e^{j \omega}] [deg]');
\ No newline at end of file diff --git a/22/CH5/EX5.12/ch5ex12.sce b/22/CH5/EX5.12/ch5ex12.sce new file mode 100755 index 000000000..10f77140b --- /dev/null +++ b/22/CH5/EX5.12/ch5ex12.sce @@ -0,0 +1,5 @@ +//signals and systems
+//maximum sampling interval
+f=50*10^3;
+T=0.5/f;
+disp(T)//in seconds
\ No newline at end of file diff --git a/22/CH5/EX5.13/ch5ex13.sce b/22/CH5/EX5.13/ch5ex13.sce new file mode 100755 index 000000000..e8431b617 --- /dev/null +++ b/22/CH5/EX5.13/ch5ex13.sce @@ -0,0 +1,5 @@ +//signals and systems
+//highest frequency of a signal
+T=25*10^-6
+f=0.5/T
+disp(f)//in hertz
\ No newline at end of file diff --git a/22/CH5/EX5.17/ch5ex17.sce b/22/CH5/EX5.17/ch5ex17.sce new file mode 100755 index 000000000..2ea480242 --- /dev/null +++ b/22/CH5/EX5.17/ch5ex17.sce @@ -0,0 +1,12 @@ +//Z transform of x[n] = a^n.u[n]+b^-n.u[-n-1]
+syms n z;
+a=0.9
+b = 1.2;
+
+x1=(a)^(n)
+x2=(b)^(-n)
+//plot2d3(n1,x1+x2)
+X1=symsum(x1*(z^(-n)),n,0,%inf)
+X2=symsum(x2*(z^(n)),n,1,%inf)
+X = X1+X2;
+disp(X,"ans=")
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 diff --git a/22/CH5/EX5.19/ch5ex19.sce b/22/CH5/EX5.19/ch5ex19.sce new file mode 100755 index 000000000..22aa4bb3c --- /dev/null +++ b/22/CH5/EX5.19/ch5ex19.sce @@ -0,0 +1,19 @@ +//LTi Systems characterized by Linear Constant
+//Coefficient Difference equations
+//Inverse Z Transform
+//z = %z;
+syms n z;
+H1 = -z/(z-0.5);
+H2 = (8/3)*z/(z-0.8);
+H3=(-8/3)*z/(z-2);
+F1 = H1*z^(n-1)*(z-0.5);
+F2 = H2*z^(n-1)*(z-0.8);
+F3 = H3*z^(n-1)*(z-2);
+h1 = limit(F1,z,0.5);
+disp(h1,'h1[n]=')
+h2 = limit(F2,z,0.8);
+disp(h2,'h2[n]=')
+h3 = limit(F3,z,2);
+disp(h3,'h3[n]=')
+h = h1+h2+h3;
+disp(h,'h[n]=')
diff --git a/22/CH5/EX5.2/ch5ex2.sce b/22/CH5/EX5.2/ch5ex2.sce new file mode 100755 index 000000000..39cc98136 --- /dev/null +++ b/22/CH5/EX5.2/ch5ex2.sce @@ -0,0 +1,29 @@ +//example 5.2 (c)
+//Z-transform of sine signal
+syms n z;
+Wo =%pi/4;
+a = (0.33)^n;
+x1=%e^(sqrt(-1)*Wo*n);
+X1=symsum(a*x1*(z^(-n)),n,0,%inf)
+x2=%e^(-sqrt(-1)*Wo*n)
+X2=symsum(a*x2*(z^(-n)),n,0,%inf)
+X =(1/(2*sqrt(-1)))*(X1+X2)
+disp(X,"ans=")
+
+//example 5.2 (a)
+//Z-transform of Impulse Sequence
+syms n z;
+X=symsum(1*(z^(-n)),n,0,0);
+disp(X,"ans=")
+
+//example 5.2 (d)
+//Z-transform of given Sequence
+syms n z;
+X=symsum(1*(z^(-n)),n,0,4);
+disp(X,"ans=")
+
+//example 5.2 (b)
+//Z-transform of unit function Sequence
+syms n z;
+X=symsum(1*(z^(-n)),n,0,%inf);
+disp(X,"ans=")
\ No newline at end of file diff --git a/22/CH5/EX5.20/ch5ex20.sce b/22/CH5/EX5.20/ch5ex20.sce new file mode 100755 index 000000000..763e67fec --- /dev/null +++ b/22/CH5/EX5.20/ch5ex20.sce @@ -0,0 +1,23 @@ +//LTi Systems characterized by Linear Constant
+//Coefficient Difference equations
+//Inverse Z Transform
+//z = %z;
+syms n z;
+H1 = (-5/3)*z/(z-0.5);
+H2 = (8/3)*z/(z-0.8);
+H3=5*z/(z-0.5);
+H4=-6*z/(z-0.6);
+F1 = H1*z^(n-1)*(z-0.5);
+F2 = H2*z^(n-1)*(z-0.8);
+F3 = H3*z^(n-1)*(z-0.5);
+F4 = H4*z^(n-1)*(z-0.6);
+h1 = limit(F1,z,0.5);
+disp(h1,'h1[n]=')
+h2 = limit(F2,z,0.8);
+disp(h2,'h2[n]=')
+h3 = limit(F3,z,0.5);
+disp(h3,'h3[n]=')
+h4 = limit(F4,z,0.6);
+disp(h4,'h4[n]=')
+h = h1+h2+h3+h4;
+disp(h,'h[n]=')
diff --git a/22/CH5/EX5.3.a/ch5ex3a.sce b/22/CH5/EX5.3.a/ch5ex3a.sce new file mode 100755 index 000000000..83a9b7c66 --- /dev/null +++ b/22/CH5/EX5.3.a/ch5ex3a.sce @@ -0,0 +1,16 @@ +//signals and systems
+//Inverse Z Transform:ROC |z|>1/3
+z = %z;
+syms n z1;//To find out Inverse z transform z must be linear z = z1
+X =(8*z-19)/((z-2)*(z-3))
+X1 = denom(X);
+zp = roots(X1);
+X1 = (8*z1-19)/((z1-2)*(z1-3))
+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]=')
\ No newline at end of file diff --git a/22/CH5/EX5.3.c/ch5ex3c.sce b/22/CH5/EX5.3.c/ch5ex3c.sce new file mode 100755 index 000000000..3f2bb0db0 --- /dev/null +++ b/22/CH5/EX5.3.c/ch5ex3c.sce @@ -0,0 +1,16 @@ +//signals and systems
+//Inverse Z Transform:ROC |z|>1/3
+z = %z;
+syms n z1;//To find out Inverse z transform z must be linear z = z1
+X =(2*z*(3*z+17))/((z-1)*(z^2-6*z+25))
+X1 = denom(X);
+zp = roots(X1);
+X1 = 2*z1*(3*z1+17)/((z1-1)*(z1^2-6*z1+25))
+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]=')
\ No newline at end of file diff --git a/22/CH5/EX5.5/ch5ex5.sce b/22/CH5/EX5.5/ch5ex5.sce new file mode 100755 index 000000000..e030c8ed8 --- /dev/null +++ b/22/CH5/EX5.5/ch5ex5.sce @@ -0,0 +1,19 @@ +//LTi Systems characterized by Linear Constant
+//Coefficient Difference equations
+//Inverse Z Transform
+//z = %z;
+syms n z;
+H1 = (26/15)/(z-(1/2));
+H2 = (7/3)/(z-2);
+H3 = (18/5)/(z-3);
+F1 = H1*z^(n)*(z-(1/2));
+F2 = H2*z^(n)*(z-2);
+F3 = H3*z^(n)*(z-3);
+h1 = limit(F1,z,1/2);
+disp(h1,'h1[n]=')
+h2 = limit(F2,z,2);
+disp(h2,'h2[n]=')
+h3 = limit(F3,z,3);
+disp(h3,'h3[n]=')
+h = h1-h2+h3;
+disp(h,'h[n]=')
\ No newline at end of file diff --git a/22/CH5/EX5.6/ch5ex6.sce b/22/CH5/EX5.6/ch5ex6.sce new file mode 100755 index 000000000..7ea80247f --- /dev/null +++ b/22/CH5/EX5.6/ch5ex6.sce @@ -0,0 +1,19 @@ +//LTi Systems characterized by Linear Constant
+//Coefficient Difference equations
+//Inverse Z Transform
+//z = %z;
+syms n z;
+H1 = (2/3)/(z+0.2);
+H2 = (8/3)/(z+0.8);
+H3 = (2)/(z+0.5);
+F1 = H1*z^(n)*(z+0.2);
+F2 = H2*z^(n)*(z+0.8);
+F3 = H3*z^(n)*(z+0.5);
+h1 = limit(F1,z,-0.2);
+disp(h1,'h1[n]=')
+h2 = limit(F2,z,-0.8);
+disp(h2,'h2[n]=')
+h3 = limit(F3,z,-0.5);
+disp(h3,'h3[n]=')
+h = h1-h2+h3;
+disp(h,'h[n]=')
\ No newline at end of file |