summaryrefslogtreecommitdiff
path: root/40/CH4
diff options
context:
space:
mode:
authorpriyanka2015-06-24 15:03:17 +0530
committerpriyanka2015-06-24 15:03:17 +0530
commitb1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b (patch)
treeab291cffc65280e58ac82470ba63fbcca7805165 /40/CH4
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 '40/CH4')
-rwxr-xr-x40/CH4/EX4.10/Exa_4_10.sce14
-rwxr-xr-x40/CH4/EX4.11/Exa_4_11.sce3
-rwxr-xr-x40/CH4/EX4.12/Exa_4_12.sce11
-rwxr-xr-x40/CH4/EX4.1b/Exa_4_1b.sci7
-rwxr-xr-x40/CH4/EX4.20/Exa_4_20.sce22
-rwxr-xr-x40/CH4/EX4.4a/Exa_4_4a.jpgbin0 -> 16351 bytes
-rwxr-xr-x40/CH4/EX4.4a/Exa_4_4a.sce8
-rwxr-xr-x40/CH4/EX4.4b/Exa_4_4b.jpgbin0 -> 16203 bytes
-rwxr-xr-x40/CH4/EX4.4b/Exa_4_4b.sce8
-rwxr-xr-x40/CH4/EX4.8/Exa_4_8.sce17
-rwxr-xr-x40/CH4/EX4.9/Exa_4_9.sce7
11 files changed, 97 insertions, 0 deletions
diff --git a/40/CH4/EX4.10/Exa_4_10.sce b/40/CH4/EX4.10/Exa_4_10.sce
new file mode 100755
index 000000000..b89aaf3b8
--- /dev/null
+++ b/40/CH4/EX4.10/Exa_4_10.sce
@@ -0,0 +1,14 @@
+//inverse transform of sequences
+//(a)X(z)=3z^-1+5z^-3+2z^-4
+z=%z;
+X1=[3*z^-1;0;5*z^-3;2*z^-4];
+n1=1:4;
+ZI=z^n1';
+x1=numer(X1.*ZI);
+disp(x1,"x[n]=");
+//(b)X(z)=2z^2-5z+5z^-1-2z^-2
+X2=[2*z^2;-5*z;0;5*z^-1;-2*z^-2];
+n2=-2:2;
+ZI=z^n2';
+x2=numer(X2.*ZI);
+disp(x2,"x[n]="); \ No newline at end of file
diff --git a/40/CH4/EX4.11/Exa_4_11.sce b/40/CH4/EX4.11/Exa_4_11.sce
new file mode 100755
index 000000000..e190701ff
--- /dev/null
+++ b/40/CH4/EX4.11/Exa_4_11.sce
@@ -0,0 +1,3 @@
+//inverse transform by long division
+z=%z;
+x=ldiv(z-4,1-z+z^2,5) \ No newline at end of file
diff --git a/40/CH4/EX4.12/Exa_4_12.sce b/40/CH4/EX4.12/Exa_4_12.sce
new file mode 100755
index 000000000..4ec3cd076
--- /dev/null
+++ b/40/CH4/EX4.12/Exa_4_12.sce
@@ -0,0 +1,11 @@
+//inverse z transforms from standard transforms
+z=%z;
+xz=z/((z-0.5)*(z-0.25));
+yz=xz/z;
+pfss(yz)
+//hence x[n]=-4(0.25)^n*un+4(0.5)^n*un;
+xz=1/((z-0.5)*(z-0.25));
+yz=xz/z;
+pfss(yz)
+//hence x[n]=-4(0.25)^n-1*u[n-1]+4(0.5)^n-1*u[n-1];
+
diff --git a/40/CH4/EX4.1b/Exa_4_1b.sci b/40/CH4/EX4.1b/Exa_4_1b.sci
new file mode 100755
index 000000000..78e129063
--- /dev/null
+++ b/40/CH4/EX4.1b/Exa_4_1b.sci
@@ -0,0 +1,7 @@
+function[za]=ztransfer(sequence,n)
+ z=poly(0,'z','r')
+ za=sequence*(1/z)^n'
+endfunction
+x1=[2 1 -5 4];
+n=-1:length(x1)-2;
+ztransfer(x1,n) \ No newline at end of file
diff --git a/40/CH4/EX4.20/Exa_4_20.sce b/40/CH4/EX4.20/Exa_4_20.sce
new file mode 100755
index 000000000..d8619d9c5
--- /dev/null
+++ b/40/CH4/EX4.20/Exa_4_20.sce
@@ -0,0 +1,22 @@
+//z transform of switched periodic signals
+z=%z;
+//sol. for 4.20a
+x1=[0 1 2];
+n=0:2;
+N=3;
+x1z=x1*(1/z)^n'
+xz=x1z/(1-z^-N)
+//sol.for 4.20b
+x1=[0 1 0 -1];
+n=0:3;
+N=4;
+x1z=x1*(1/z)^n'
+xz=x1z/(1-z^-N)
+//sol.for 4.20c
+xz=(2+z^-1)/(1-z^-3);
+x1z=numer(xz)
+//thus first period of xn is [2 1 0]
+//sol.for 4.20d
+xz=(z^-1-z^-4)/(1-z^-6);
+x1z=numer(xz)
+//thus first period of xn is [0 1 0 0 -1 0] \ No newline at end of file
diff --git a/40/CH4/EX4.4a/Exa_4_4a.jpg b/40/CH4/EX4.4a/Exa_4_4a.jpg
new file mode 100755
index 000000000..3d2add22f
--- /dev/null
+++ b/40/CH4/EX4.4a/Exa_4_4a.jpg
Binary files differ
diff --git a/40/CH4/EX4.4a/Exa_4_4a.sce b/40/CH4/EX4.4a/Exa_4_4a.sce
new file mode 100755
index 000000000..e8866a358
--- /dev/null
+++ b/40/CH4/EX4.4a/Exa_4_4a.sce
@@ -0,0 +1,8 @@
+//Pole-Zero plots
+z=%z;
+az=2*z*(z+1);
+bz=(z-1/3)*((z^2)+1/4)*((z^2)+4*z+5);
+poles=roots(bz)
+zeroes=roots(az)
+h=az/bz
+plzr(h) \ No newline at end of file
diff --git a/40/CH4/EX4.4b/Exa_4_4b.jpg b/40/CH4/EX4.4b/Exa_4_4b.jpg
new file mode 100755
index 000000000..fd0732194
--- /dev/null
+++ b/40/CH4/EX4.4b/Exa_4_4b.jpg
Binary files differ
diff --git a/40/CH4/EX4.4b/Exa_4_4b.sce b/40/CH4/EX4.4b/Exa_4_4b.sce
new file mode 100755
index 000000000..1b6a0ec81
--- /dev/null
+++ b/40/CH4/EX4.4b/Exa_4_4b.sce
@@ -0,0 +1,8 @@
+//Pole-Zero plots
+z=%z;
+az=z^4+4.25*z^2+1;
+bz=z^4;
+poles=roots(bz)
+zeroes=roots(az)
+h=az/bz
+plzr(h) \ No newline at end of file
diff --git a/40/CH4/EX4.8/Exa_4_8.sce b/40/CH4/EX4.8/Exa_4_8.sce
new file mode 100755
index 000000000..b897889c0
--- /dev/null
+++ b/40/CH4/EX4.8/Exa_4_8.sce
@@ -0,0 +1,17 @@
+//stability of recursive filter
+//for roc:/z/>/a/
+a=input('enter the value of alpha')
+z=%z;
+H=z/(z-a);
+if (abs(a)<1)
+ disp("system is stable")
+else
+ disp("system is not stable")
+ end
+ //for roc:/z/</a/
+ if (abs(a)>1)
+ disp("system is stable")
+else
+ disp("system is not stable")
+ end
+ \ No newline at end of file
diff --git a/40/CH4/EX4.9/Exa_4_9.sce b/40/CH4/EX4.9/Exa_4_9.sce
new file mode 100755
index 000000000..4dd5beddb
--- /dev/null
+++ b/40/CH4/EX4.9/Exa_4_9.sce
@@ -0,0 +1,7 @@
+//inverse systems
+z=%z;
+H=(1+2*(z^(-1)))/(1+3*(z^(-1)));
+//inverse of H is
+H1=1/H
+H=1+2*(z^(-1))+3*(z^(-2));
+H1=1/H \ No newline at end of file