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/CH3 | |
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/CH3')
25 files changed, 191 insertions, 0 deletions
diff --git a/22/CH3/EX3.1/ch3ex1.jpg b/22/CH3/EX3.1/ch3ex1.jpg Binary files differnew file mode 100755 index 000000000..2c45c599d --- /dev/null +++ b/22/CH3/EX3.1/ch3ex1.jpg diff --git a/22/CH3/EX3.1/ch3ex1.sce b/22/CH3/EX3.1/ch3ex1.sce new file mode 100755 index 000000000..0ed75454d --- /dev/null +++ b/22/CH3/EX3.1/ch3ex1.sce @@ -0,0 +1,14 @@ +//signals and systems
+//time domain analysis of discreet time systems
+//energy of a signal
+clear;
+close;
+clc;
+n=0:1:5
+figure
+a=gca();
+plot2d(n,n);
+energy=sum(n^2)
+power=(1/6)*sum(n^2)
+disp(energy)
+disp(power)
\ No newline at end of file diff --git a/22/CH3/EX3.10/ch3ex10.sce b/22/CH3/EX3.10/ch3ex10.sce new file mode 100755 index 000000000..5d4a422cc --- /dev/null +++ b/22/CH3/EX3.10/ch3ex10.sce @@ -0,0 +1,34 @@ +//signals and systems
+//time domain analysis of discreet time systems
+//total response with initial conditions
+clear;
+close;
+clc;
+n=(-2:10)';
+y=[25/4;0;zeros(length(n)-2,1)];
+x=[0;0;4^-n(3:length(n))];
+for k=1:length(n)-2
+ y(k+2)=0.6*y(k+1)+0.16*y(k)+5*x(k+2);
+end;
+clf;
+a=gca();
+plot2d3(n,y);
+
+y1=[25/4;0;zeros(length(n)-2,1)];
+x=[0;0;4^-n(3:length(n))];
+for k=1:length(n)-2
+ y1(k+2)=-6*y1(k+1)-9*y1(k)+2*x(k+2)+6*x(k+1);
+end
+figure
+a=gca();
+plot2d3(n,y1);
+
+
+y2=[25/4;0;zeros(length(n)-2,1)];
+x=[0;0;4^-n(3:length(n))];
+for k=1:length(n)-2
+ y2(k+2)=1.56*y2(k+1)-0.81*y2(k)+ x(k+1)+3*x(k);
+end
+figure
+a=gca();
+plot2d3(n,y2);
diff --git a/22/CH3/EX3.10/ch3ex10a.jpg b/22/CH3/EX3.10/ch3ex10a.jpg Binary files differnew file mode 100755 index 000000000..1c4d6cff6 --- /dev/null +++ b/22/CH3/EX3.10/ch3ex10a.jpg diff --git a/22/CH3/EX3.10/ch3ex10b.jpg b/22/CH3/EX3.10/ch3ex10b.jpg Binary files differnew file mode 100755 index 000000000..eaf1c06de --- /dev/null +++ b/22/CH3/EX3.10/ch3ex10b.jpg diff --git a/22/CH3/EX3.11/ch3ex11.jpg b/22/CH3/EX3.11/ch3ex11.jpg Binary files differnew file mode 100755 index 000000000..d110f7d82 --- /dev/null +++ b/22/CH3/EX3.11/ch3ex11.jpg diff --git a/22/CH3/EX3.11/ch3ex11.sce b/22/CH3/EX3.11/ch3ex11.sce new file mode 100755 index 000000000..4d976467e --- /dev/null +++ b/22/CH3/EX3.11/ch3ex11.sce @@ -0,0 +1,13 @@ +//signals and systems
+//time domain analysis of discreet time systems
+//impulse response with initial conditions
+clear;
+close;
+clc;
+n=(0:19);
+x=[1 zeros(1,length(n)-1)];
+a=[1 -0.6 -0.16];
+b=[5 0 0];
+h=filter(b,a,x);
+clf;
+plot2d3(n,h); xlabel('n'); ylabel('h[n]');
\ No newline at end of file diff --git a/22/CH3/EX3.13/ch3ex13.jpg b/22/CH3/EX3.13/ch3ex13.jpg Binary files differnew file mode 100755 index 000000000..49f662f9c --- /dev/null +++ b/22/CH3/EX3.13/ch3ex13.jpg diff --git a/22/CH3/EX3.13/ch3ex13.sce b/22/CH3/EX3.13/ch3ex13.sce new file mode 100755 index 000000000..481063f75 --- /dev/null +++ b/22/CH3/EX3.13/ch3ex13.sce @@ -0,0 +1,12 @@ +//signals and systems
+//time domain analysis of discreet time systems
+//convolution
+clear;
+close;
+clc;
+n=(0:19);
+x=0.8^n;
+g=0.3^n;
+n1=(0:1:length(x)+length(g)-2);
+c=convol(x,g);
+plot2d3(n1,c);
diff --git a/22/CH3/EX3.14/ch3ex14.jpg b/22/CH3/EX3.14/ch3ex14.jpg Binary files differnew file mode 100755 index 000000000..24a2ced35 --- /dev/null +++ b/22/CH3/EX3.14/ch3ex14.jpg diff --git a/22/CH3/EX3.14/ch3ex14.sce b/22/CH3/EX3.14/ch3ex14.sce new file mode 100755 index 000000000..d7a2784cb --- /dev/null +++ b/22/CH3/EX3.14/ch3ex14.sce @@ -0,0 +1,14 @@ +//signals and systems
+//time domain analysis of discreet time systems
+//convolution
+clear;
+close;
+clc;
+n=(0:14);
+x=4^-n;
+a=[1 -0.6 -0.16];
+b=[5 0 0];
+y=filter(b,a,x);
+clf;
+plot2d3(n,y); xlabel('n'); ylabel('y[n]');
+
diff --git a/22/CH3/EX3.16/ch3ex16.jpg b/22/CH3/EX3.16/ch3ex16.jpg Binary files differnew file mode 100755 index 000000000..55fa0f0c9 --- /dev/null +++ b/22/CH3/EX3.16/ch3ex16.jpg diff --git a/22/CH3/EX3.16/ch3ex16.sce b/22/CH3/EX3.16/ch3ex16.sce new file mode 100755 index 000000000..fc6e89ef7 --- /dev/null +++ b/22/CH3/EX3.16/ch3ex16.sce @@ -0,0 +1,12 @@ +//signals and systems
+//time domain analysis of discreet time systems
+//convolution by sliding tape method
+clear;
+close;
+clc;
+x=[-2 -1 0 1 2 3 4];
+g=[1 1 1 1 1 1 1 1];
+n=(0:1:length(x)+length(g)-2);
+c=convol(x,g);
+clf;
+plot2d3(n,c); xlabel('n'); ylabel('c[n]');
diff --git a/22/CH3/EX3.17/ch3ex17.jpg b/22/CH3/EX3.17/ch3ex17.jpg Binary files differnew file mode 100755 index 000000000..798473de6 --- /dev/null +++ b/22/CH3/EX3.17/ch3ex17.jpg diff --git a/22/CH3/EX3.17/ch3ex17.sce b/22/CH3/EX3.17/ch3ex17.sce new file mode 100755 index 000000000..bf7514019 --- /dev/null +++ b/22/CH3/EX3.17/ch3ex17.sce @@ -0,0 +1,16 @@ +//signals and systems
+//time domain analysis of discreet time systems
+//convolution by sliding tape method
+clear;
+close;
+clc;
+n=(0:10)';
+y=[4;13;zeros(length(n)-2,1)];
+x=(3*n+5).*(n>=0);
+for k=1:length(n)-2
+ y(k+2)=5*y(k+1)-6*y(k)+x(k+1)-5*x(k);
+end
+clf;
+plot2d3(n,y); xlabel('n'); ylabel('y[n]');
+disp('n y');
+disp(msprintf('%f\t\t%f\n',[n,y]));
\ No newline at end of file diff --git a/22/CH3/EX3.18/ch3ex18.jpg b/22/CH3/EX3.18/ch3ex18.jpg Binary files differnew file mode 100755 index 000000000..5f2fff1ae --- /dev/null +++ b/22/CH3/EX3.18/ch3ex18.jpg diff --git a/22/CH3/EX3.18/ch3ex18.sce b/22/CH3/EX3.18/ch3ex18.sce new file mode 100755 index 000000000..5d868c99a --- /dev/null +++ b/22/CH3/EX3.18/ch3ex18.sce @@ -0,0 +1,16 @@ +//signals and systems
+//time domain analysis of discreet time systems
+//convolution by sliding tape method
+clear;
+close;
+clc;
+n=(0:10)';
+y=[0;zeros(length(n)-1,1)];
+x=(n+1)^2;
+for k=1:length(n)-1
+ y(k+1)=y(k)+x(k);
+end;
+clf;
+a=gca();
+plot2d3(n,y);xtitle('sum','n')
+plot(n,y,'b.')
\ No newline at end of file diff --git a/22/CH3/EX3.19/ch3ex19.jpg b/22/CH3/EX3.19/ch3ex19.jpg Binary files differnew file mode 100755 index 000000000..5f6ecb9d2 --- /dev/null +++ b/22/CH3/EX3.19/ch3ex19.jpg diff --git a/22/CH3/EX3.19/ch3ex19.sce b/22/CH3/EX3.19/ch3ex19.sce new file mode 100755 index 000000000..fd34c2c06 --- /dev/null +++ b/22/CH3/EX3.19/ch3ex19.sce @@ -0,0 +1,13 @@ +//signals and systems
+//time domain analysis of discreet time systems
+//convolution by sliding tape method
+clear;
+close;
+clc;
+n=(0:14);
+x=3^n;
+a=[1 -3 2];
+b=[0 1 2];
+y=filter(b,a,x);
+clf;
+plot2d3(n,y); xlabel('n'); ylabel('y[n]');
diff --git a/22/CH3/EX3.20/ch3ex20.jpg b/22/CH3/EX3.20/ch3ex20.jpg Binary files differnew file mode 100755 index 000000000..6218b62a2 --- /dev/null +++ b/22/CH3/EX3.20/ch3ex20.jpg diff --git a/22/CH3/EX3.20/ch3ex20.sce b/22/CH3/EX3.20/ch3ex20.sce new file mode 100755 index 000000000..c49d0107d --- /dev/null +++ b/22/CH3/EX3.20/ch3ex20.sce @@ -0,0 +1,14 @@ +//signals and systems
+//time domain analysis of discreet time systems
+//convolution by sliding tape method
+clear;
+close;
+clc;
+pi=3.14;
+n=(0:14);
+x=cos(2*n+pi/3);
+a=[1 -1 0.16];
+b=[0 1 0.32];
+y=filter(b,a,x);
+clf;
+plot2d3(n,y); xlabel('n'); ylabel('y[n]');
diff --git a/22/CH3/EX3.8/ch3ex8.jpg b/22/CH3/EX3.8/ch3ex8.jpg Binary files differnew file mode 100755 index 000000000..cb817ea3c --- /dev/null +++ b/22/CH3/EX3.8/ch3ex8.jpg diff --git a/22/CH3/EX3.8/ch3ex8.sce b/22/CH3/EX3.8/ch3ex8.sce new file mode 100755 index 000000000..cf7361f87 --- /dev/null +++ b/22/CH3/EX3.8/ch3ex8.sce @@ -0,0 +1,18 @@ +//signals and systems
+//time domain analysis of discreet time systems
+//iterative solution
+clear;
+close;
+clc;
+n=(-1:10)';
+y=[16;0;zeros(length(n)-2,1)];
+x=[0;0;n(3:length(n))];
+for k=1:length(n)-1
+ y(k+1)=0.5*y(k)+x(k+1);
+end;
+clf;
+size(y)
+size(n)
+plot2d3(n,y);
+plot(n,y,'r.')
+disp([msprintf([n,y])]);
diff --git a/22/CH3/EX3.9/ch3ex9.jpg b/22/CH3/EX3.9/ch3ex9.jpg Binary files differnew file mode 100755 index 000000000..b9fcea43d --- /dev/null +++ b/22/CH3/EX3.9/ch3ex9.jpg diff --git a/22/CH3/EX3.9/ch3ex9.sce b/22/CH3/EX3.9/ch3ex9.sce new file mode 100755 index 000000000..b651f07e0 --- /dev/null +++ b/22/CH3/EX3.9/ch3ex9.sce @@ -0,0 +1,15 @@ +//signals and systems
+//time domain analysis of discreet time systems
+//iterative solution
+clear;
+close;
+clc;
+n=(-2:10)';
+y=[1;2;zeros(length(n)-2,1)];
+x=[0;0;n(3:length(n))];
+for k=1:length(n)-2
+ y(k+2)=y(k+1)-0.24*y(k)+x(k+2)-2*x(k+1);
+end;
+clf;
+plot2d3(n,y);
+disp([msprintf([n,y])]);
|