summaryrefslogtreecommitdiff
path: root/1592/CH9
diff options
context:
space:
mode:
Diffstat (limited to '1592/CH9')
-rwxr-xr-x1592/CH9/EX9.1/Fig9_1.jpgbin0 -> 7332 bytes
-rwxr-xr-x1592/CH9/EX9.1/example_9_1.sce15
-rwxr-xr-x1592/CH9/EX9.10/example_9_10.sce8
-rwxr-xr-x1592/CH9/EX9.11/Fig9_11.jpgbin0 -> 6454 bytes
-rwxr-xr-x1592/CH9/EX9.11/example_9_11.sce25
-rwxr-xr-x1592/CH9/EX9.3/Fig9_3_3.jpgbin0 -> 5573 bytes
-rwxr-xr-x1592/CH9/EX9.3/example_9_3.sce23
-rwxr-xr-x1592/CH9/EX9.4/Fig9_4.jpgbin0 -> 5840 bytes
-rwxr-xr-x1592/CH9/EX9.4/example_9_4.sce16
-rwxr-xr-x1592/CH9/EX9.5/Fig9_5_1.jpgbin0 -> 5882 bytes
-rwxr-xr-x1592/CH9/EX9.5/Fig9_5_2.jpgbin0 -> 6627 bytes
-rwxr-xr-x1592/CH9/EX9.5/example_9_5.sce28
-rwxr-xr-x1592/CH9/EX9.6/Fig9_6_1.jpgbin0 -> 7992 bytes
-rwxr-xr-x1592/CH9/EX9.6/Fig9_6_2.jpgbin0 -> 8513 bytes
-rwxr-xr-x1592/CH9/EX9.6/example_9_6.sce26
-rwxr-xr-x1592/CH9/EX9.7/Fig9_7_1.jpgbin0 -> 5209 bytes
-rwxr-xr-x1592/CH9/EX9.7/Fig9_7_2.jpgbin0 -> 6602 bytes
-rwxr-xr-x1592/CH9/EX9.7/example_9_7.sce29
18 files changed, 170 insertions, 0 deletions
diff --git a/1592/CH9/EX9.1/Fig9_1.jpg b/1592/CH9/EX9.1/Fig9_1.jpg
new file mode 100755
index 000000000..e7f052947
--- /dev/null
+++ b/1592/CH9/EX9.1/Fig9_1.jpg
Binary files differ
diff --git a/1592/CH9/EX9.1/example_9_1.sce b/1592/CH9/EX9.1/example_9_1.sce
new file mode 100755
index 000000000..b6a0d60d7
--- /dev/null
+++ b/1592/CH9/EX9.1/example_9_1.sce
@@ -0,0 +1,15 @@
+//Scilab Code for Example 9.1 of Signals and systems by
+//P.Ramakrishna Rao
+//Convolution of two signals
+clc;
+n=1;
+for t=-10:0.1:10
+ x(n)=5*cos(t);
+ y(n)=2*exp(-abs(t));
+ n=n+1;
+end
+z=conv(x,y);
+t2=-20:0.1:20;
+plot2d(t2,z);
+title('Output signal');
+xlabel('Time t-->');
diff --git a/1592/CH9/EX9.10/example_9_10.sce b/1592/CH9/EX9.10/example_9_10.sce
new file mode 100755
index 000000000..6bc1c9ce7
--- /dev/null
+++ b/1592/CH9/EX9.10/example_9_10.sce
@@ -0,0 +1,8 @@
+//Scilab Code for Example 9.10 of Signals and systems by
+//P.Ramakrishna Rao
+//Maximum Value of Auto-Correlation Function
+clc;
+clear;
+disp('Maximum Value of ACF=Rxx(0)');
+x=200*integrate('exp(-2*t)','t',0,1000);
+disp(x,'Energy in x(t)=');
diff --git a/1592/CH9/EX9.11/Fig9_11.jpg b/1592/CH9/EX9.11/Fig9_11.jpg
new file mode 100755
index 000000000..1c6d7361c
--- /dev/null
+++ b/1592/CH9/EX9.11/Fig9_11.jpg
Binary files differ
diff --git a/1592/CH9/EX9.11/example_9_11.sce b/1592/CH9/EX9.11/example_9_11.sce
new file mode 100755
index 000000000..cb72453e8
--- /dev/null
+++ b/1592/CH9/EX9.11/example_9_11.sce
@@ -0,0 +1,25 @@
+//Scilab Code for Example 9.11 of Signals and systems by
+//P.Ramakrishna Rao
+//Power Spectral Density
+clear;
+clc;
+clear f n;
+fo=2;
+n=1;
+RC=1/(2*%pi*10^3);
+w=4*%pi*10^3
+H=1/(1+%i*w*RC);
+disp(H,'H(f)');
+X=(abs(H))^2;
+for f=-5:5
+ Pxx(n)=25*[delta(f-fo)+delta(f+fo)];
+ Pyy(n)=X*Pxx(n);
+ n=n+1;
+end
+disp(Pxx,'Pxx=');
+disp(Pyy,'Pyy=');
+f=-5:5;
+plot2d3(f,Pyy,-2);
+title('Power Spectral Density');
+ylabel('Pyy(f)');
+xlabel('f in Hz');
diff --git a/1592/CH9/EX9.3/Fig9_3_3.jpg b/1592/CH9/EX9.3/Fig9_3_3.jpg
new file mode 100755
index 000000000..dda380259
--- /dev/null
+++ b/1592/CH9/EX9.3/Fig9_3_3.jpg
Binary files differ
diff --git a/1592/CH9/EX9.3/example_9_3.sce b/1592/CH9/EX9.3/example_9_3.sce
new file mode 100755
index 000000000..9d6385185
--- /dev/null
+++ b/1592/CH9/EX9.3/example_9_3.sce
@@ -0,0 +1,23 @@
+//Scilab Code for Example 9.3 of Signals and systems by
+//P.Ramakrishna Rao
+//Convolution of two signals
+clc;
+clear;
+n=1;
+for t=-5:0.1:5
+ x(n)=-2*u(t-0.5)+2*u(t-1.5);
+ y(n)=(t+1)*u(t+1)-(t+1)*u(t-2);
+ n=n+1;
+end
+z=conv(x,y);
+t=-5:0.1:5;
+plot2d2(t,x,5);
+title('x(t)');
+figure(1);
+t=-5:0.1:5;
+plot2d(t,y,2);
+title('y(t)');
+figure(2);
+t=-10:0.1:10;
+plot2d(t,z,6);
+title('Convolution');
diff --git a/1592/CH9/EX9.4/Fig9_4.jpg b/1592/CH9/EX9.4/Fig9_4.jpg
new file mode 100755
index 000000000..a18190163
--- /dev/null
+++ b/1592/CH9/EX9.4/Fig9_4.jpg
Binary files differ
diff --git a/1592/CH9/EX9.4/example_9_4.sce b/1592/CH9/EX9.4/example_9_4.sce
new file mode 100755
index 000000000..2b68c03d7
--- /dev/null
+++ b/1592/CH9/EX9.4/example_9_4.sce
@@ -0,0 +1,16 @@
+//Scilab Code for Example 9.4 of Signals and systems by
+//P.Ramakrishna Rao
+clc;
+clear;
+T=1;
+n=1;
+for t=-T/2:0.01:T/2;
+ x(n)=10*cos(%pi*t/T);
+ n=n+1;
+end
+t=-T/2:0.01:T/2;
+plot(t,x);
+title('x(t)');
+disp('Rxx(0)=Energy of signal');
+Rxx=integrate('50*(1+cos(2*%pi*t/T))','t',-T/2,T/2);
+disp(Rxx,'Rxx(0)=');
diff --git a/1592/CH9/EX9.5/Fig9_5_1.jpg b/1592/CH9/EX9.5/Fig9_5_1.jpg
new file mode 100755
index 000000000..184f6b813
--- /dev/null
+++ b/1592/CH9/EX9.5/Fig9_5_1.jpg
Binary files differ
diff --git a/1592/CH9/EX9.5/Fig9_5_2.jpg b/1592/CH9/EX9.5/Fig9_5_2.jpg
new file mode 100755
index 000000000..5b3958831
--- /dev/null
+++ b/1592/CH9/EX9.5/Fig9_5_2.jpg
Binary files differ
diff --git a/1592/CH9/EX9.5/example_9_5.sce b/1592/CH9/EX9.5/example_9_5.sce
new file mode 100755
index 000000000..4e148ec35
--- /dev/null
+++ b/1592/CH9/EX9.5/example_9_5.sce
@@ -0,0 +1,28 @@
+//Scilab Code for Example 9.5 of Signals and systems by
+//P.Ramakrishna Rao
+clc;
+clear;
+clear z x y t T;
+n=1;
+for t=-10:0.01:10;
+ x(n)=exp(-t)*u(t);
+ n=n+1;
+end
+t=-10:0.01:10;
+plot(t,x);
+title('x(t)');
+n=1;
+for T=-10:0.1:0;
+ z(n)=integrate('exp(-t)*exp(T-t)','t',0,1000);
+ n=n+1;
+end
+n=1;
+for T=0.1:0.1:10;
+ z(n+101)=integrate('exp(-t)*exp(T-t)','t',T,1000);
+ n=n+1;
+end
+figure(1);
+T=-10:0.1:10;
+plot(T,z);
+title('Rxx(T)');
+xlabel('t in seconds');
diff --git a/1592/CH9/EX9.6/Fig9_6_1.jpg b/1592/CH9/EX9.6/Fig9_6_1.jpg
new file mode 100755
index 000000000..88aaa321c
--- /dev/null
+++ b/1592/CH9/EX9.6/Fig9_6_1.jpg
Binary files differ
diff --git a/1592/CH9/EX9.6/Fig9_6_2.jpg b/1592/CH9/EX9.6/Fig9_6_2.jpg
new file mode 100755
index 000000000..d1a28d866
--- /dev/null
+++ b/1592/CH9/EX9.6/Fig9_6_2.jpg
Binary files differ
diff --git a/1592/CH9/EX9.6/example_9_6.sce b/1592/CH9/EX9.6/example_9_6.sce
new file mode 100755
index 000000000..57cd4a8a9
--- /dev/null
+++ b/1592/CH9/EX9.6/example_9_6.sce
@@ -0,0 +1,26 @@
+//Scilab Code for Example 9.6 of Signals and systems by
+//P.Ramakrishna Rao
+clc;
+clear;
+clear z x y t T;
+A=1;
+n=1;
+wo=2*%pi;
+theta=%pi/2;
+for t=-5:0.01:5;
+ x(n)=A*cos(wo*t+theta);
+ n=n+1;
+end
+t=-5:0.01:5;
+plot(t,x);
+title('x(t)');
+n=1;
+for T=-5:0.1:5;
+ z(n)=(A^2/2)*cos(wo*T);
+ n=n+1;
+end
+figure(1);
+T=-5:0.1:5;
+plot(T,z);
+title('Rxx(T)');
+xlabel('t in seconds')
diff --git a/1592/CH9/EX9.7/Fig9_7_1.jpg b/1592/CH9/EX9.7/Fig9_7_1.jpg
new file mode 100755
index 000000000..7fd112ccc
--- /dev/null
+++ b/1592/CH9/EX9.7/Fig9_7_1.jpg
Binary files differ
diff --git a/1592/CH9/EX9.7/Fig9_7_2.jpg b/1592/CH9/EX9.7/Fig9_7_2.jpg
new file mode 100755
index 000000000..63df45d4a
--- /dev/null
+++ b/1592/CH9/EX9.7/Fig9_7_2.jpg
Binary files differ
diff --git a/1592/CH9/EX9.7/example_9_7.sce b/1592/CH9/EX9.7/example_9_7.sce
new file mode 100755
index 000000000..cc9d351b7
--- /dev/null
+++ b/1592/CH9/EX9.7/example_9_7.sce
@@ -0,0 +1,29 @@
+//Scilab Code for Example 9.7 of Signals and systems by
+//P.Ramakrishna Rao
+clc;
+clear;
+clear z x y t T A;
+A=4;
+T0=2;
+n=1;
+for T=0:0.1:T0;
+ if T<T0/2 then
+ x(n)=A;
+ else x(n)=0;
+ end
+ n=n+1;
+end
+T=0:0.1:T0;
+plot2d2(T,x,6);
+title('x(t))');
+xlabel('t in seconds');
+n=1;
+for T=0:0.1:T0;
+ z(n)=(1/T0)*integrate('A^2','t',T,T0/2);
+ n=n+1;
+end
+T=0:0.1:T0;
+figure(1);
+plot(T,z);
+title('Rxx(T)');
+xlabel('T in seconds');