summaryrefslogtreecommitdiff
path: root/2279/CH6
diff options
context:
space:
mode:
authorprashantsinalkar2017-10-10 12:27:19 +0530
committerprashantsinalkar2017-10-10 12:27:19 +0530
commit7f60ea012dd2524dae921a2a35adbf7ef21f2bb6 (patch)
treedbb9e3ddb5fc829e7c5c7e6be99b2c4ba356132c /2279/CH6
parentb1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b (diff)
downloadScilab-TBC-Uploads-7f60ea012dd2524dae921a2a35adbf7ef21f2bb6.tar.gz
Scilab-TBC-Uploads-7f60ea012dd2524dae921a2a35adbf7ef21f2bb6.tar.bz2
Scilab-TBC-Uploads-7f60ea012dd2524dae921a2a35adbf7ef21f2bb6.zip
initial commit / add all books
Diffstat (limited to '2279/CH6')
-rw-r--r--2279/CH6/EX6.1/Ex6_1.sce27
-rw-r--r--2279/CH6/EX6.2/Ex6_2.sce19
-rw-r--r--2279/CH6/EX6.3/Ex6_3.sce24
-rw-r--r--2279/CH6/EX6.4/Ex6_4.sce41
-rw-r--r--2279/CH6/EX6.6/Ex6_6.sce16
-rw-r--r--2279/CH6/EX6.7/Ex6_7.sce53
6 files changed, 180 insertions, 0 deletions
diff --git a/2279/CH6/EX6.1/Ex6_1.sce b/2279/CH6/EX6.1/Ex6_1.sce
new file mode 100644
index 000000000..fd38eb38b
--- /dev/null
+++ b/2279/CH6/EX6.1/Ex6_1.sce
@@ -0,0 +1,27 @@
+//Sampling the CT signals
+clc
+clear
+close
+t=-0.3:0.0001:0.3;
+x1=2*cos(2*%pi*20*t);//F1=20Hz
+x2=2*cos(2*%pi*80*t);//F2=80Hz
+figure(1)
+subplot(2,1,1)
+plot(t,x1);
+xtitle("CT Signal X1(t)","t","x1(t)");
+subplot(2,1,2)
+plot(t,x2)
+xtitle("CT Signal X2(t)","t","x2(t)");
+//Given Sampling frequency Fs=60Hz
+Fs=60;
+n=-10:1:10;
+Ts=1/60;//Sampling interval Ts=1/Fs
+x1_n=2*cos(2*%pi*20*n*Ts);
+x2_n=2*cos(2*%pi*80*n*Ts);
+figure(2)
+subplot(2,1,1)
+plot2d3('gnn',n,x1_n,3);
+xtitle("Sampled signal x1[n]","n","x1[n]")
+subplot(2,1,2)
+plot2d3('gnn',n,x2_n,3);
+xtitle("Sampled signal x2[n]","n","x2[n]")
diff --git a/2279/CH6/EX6.2/Ex6_2.sce b/2279/CH6/EX6.2/Ex6_2.sce
new file mode 100644
index 000000000..ac8ea0186
--- /dev/null
+++ b/2279/CH6/EX6.2/Ex6_2.sce
@@ -0,0 +1,19 @@
+//Sampling the CT signals
+clc
+clear
+close
+t=-10:0.01:10;
+x=sin(%pi*t);
+figure(1)
+subplot(2,1,1)
+plot(t,x);
+xtitle("CT Signal sin(pi*t)","t","x(t)");
+Wb=%pi;//Given Sampling frequency is Pi radians
+Ws=2*Wb;
+Fs=Ws/(2*%pi);
+n=-100:1:100;
+Ts=1/Fs;//Sampling interval Ts=1/Fs
+x_n=sin(%pi*n*Ts);
+subplot(2,1,2)
+plot2d(n,x_n,rect=[-100 -2 100 2]);
+xtitle("Sampled signal x[n]","n","x[n]")
diff --git a/2279/CH6/EX6.3/Ex6_3.sce b/2279/CH6/EX6.3/Ex6_3.sce
new file mode 100644
index 000000000..00aaa64e7
--- /dev/null
+++ b/2279/CH6/EX6.3/Ex6_3.sce
@@ -0,0 +1,24 @@
+//Sampling the CT signals
+clc
+clear
+close
+t=-0.3:0.0001:0.3;
+x=5*sin(10*%pi*t);
+figure(1)
+plot(t,x);
+xtitle("CT Signal x(t)","t","x(t)");
+//Given Sampling frequency (a) Fs=15Hz (b) Fs=6Hz
+Fs1=15;
+Fs2=6;
+n=-10:1:10;
+Ts1=1/Fs1;//Sampling interval Ts=1/Fs
+Ts2=1/Fs2;
+x1=5*sin(%pi*10*n*Ts1);
+x2=5*sin(%pi*10*n*Ts2);
+figure(2)
+subplot(2,1,1)
+plot2d3('gnn',n,x1);
+xtitle("Sampled signal Fs=15Hz","n","x1[n]")
+subplot(2,1,2)
+plot2d3('gnn',n,x2);
+xtitle("Sampled signal Fs=6Hz","n","x2[n]")
diff --git a/2279/CH6/EX6.4/Ex6_4.sce b/2279/CH6/EX6.4/Ex6_4.sce
new file mode 100644
index 000000000..b049ab9ef
--- /dev/null
+++ b/2279/CH6/EX6.4/Ex6_4.sce
@@ -0,0 +1,41 @@
+// Continuous Time Fourier Transforms of
+// Sinusoidal waveforms 3cos(2*pi*t)
+clear;
+clc;
+close;
+// CTFT
+t=-10:0.01:10;
+x=3*cos(2*%pi*t);
+subplot(2,1,1)
+plot(t,x);
+xtitle("CT signal x(t)","t","x(t)");
+T1 = 2;
+T = 4*T1;
+Wo = 6*%pi/T;
+W = [-Wo,0,Wo];
+ak = (2*%pi*Wo*T1/%pi);
+XW =[ak,0,ak];
+subplot(2,1,2)
+plot2d3('gnn',W,real(XW));
+xlabel(' W');
+xtitle('CTFT of cos(Wot)','W','X(jW)')
+n=-10:10;
+W1=4*%pi;
+W2=8*%pi;
+W3=3*%pi;
+T1=(2*%pi)/W1;
+T2=(2*%pi)/W2;
+T3=(2*%pi)/W3;
+x1=3*cos(2*%pi*n*T1);
+x2=3*cos(2*%pi*n*T2);
+x3=3*cos(2*%pi*n*T3);
+figure(1)
+subplot(3,1,1)
+plot2d3('gnn',n,x1);
+xtitle("X(t) sampled at Ws=4*pi","n","x1[n]");
+subplot(3,1,2)
+plot2d3('gnn',n,x2);
+xtitle("X(t) sampled at Ws=8*pi","n","x2[n]");
+subplot(3,1,3)
+plot2d3('gnn',n,x3);
+xtitle("X(t) sampled at Ws=3*pi","n","x3[n]");
diff --git a/2279/CH6/EX6.6/Ex6_6.sce b/2279/CH6/EX6.6/Ex6_6.sce
new file mode 100644
index 000000000..6b952dc2a
--- /dev/null
+++ b/2279/CH6/EX6.6/Ex6_6.sce
@@ -0,0 +1,16 @@
+//Sampling the signal at nyquist rate
+clear;
+clc;
+close;
+t=-1:0.01:1;
+x=2*cos(200*%pi*t)+3*sin(100*%pi*t)-4*sin(500*%pi*t);
+f1=100;
+f2=50;
+f3=250;
+fb=max(f1,f2,f3);
+Fs=2*fb;
+Ts=1/Fs;
+n=-10:10;
+x_n=2*cos(200*%pi*n*Ts)+3*sin(100*%pi*n*Ts)-4*sin(500*%pi*n*Ts);
+plot2d3('gnn',n,x_n)
+xtitle("DT Signal x(n) sampled at nyquist rate","n","x[n]");
diff --git a/2279/CH6/EX6.7/Ex6_7.sce b/2279/CH6/EX6.7/Ex6_7.sce
new file mode 100644
index 000000000..082423ad3
--- /dev/null
+++ b/2279/CH6/EX6.7/Ex6_7.sce
@@ -0,0 +1,53 @@
+//Determining nyquist rate for the signals
+clc
+clear
+close
+Wb1=4*%pi;
+Wb2=10*%pi;
+Wbs=max(Wb1,Wb2);
+Ws=2*Wbs;
+//Bandlimited frequency doesnt change by Amplitude scaling
+//(a) 2*x1(t)
+Wa=2*Wb1
+disp("Wa=")
+disp(Wa)
+//Timing shifting doesnt affect the magnitude spectrum
+//(b) x1(t-1)
+Wb=2*Wb1
+disp("Wb=")
+disp(Wb)
+//Adding two band-limited spectrums will not sampling frequency
+//(c) 2*x1(t)+x1(t-1)
+Wc=2*Wb1
+disp("Wc=")
+disp(Wc)
+//Compressing time axis expands frequency axis by the same factor
+//(d) x2(2t)
+Wd=2*2*Wb2
+disp("Wd=")
+disp(Wd)
+//Expanding the time axis compresses the frequency axis by same factor
+//(e) x2(t/2)
+We=1/2*2*Wb2
+disp("We=")
+disp(We)
+//(f) x2(2t)+x2(t/2)
+Wf=max(Wd,We)
+disp("Wf=")
+disp(Wf)
+//x1(t)x2(t)
+Wg=2*(Wb1+Wb2)
+disp("Wg=")
+disp(Wg)
+//x1(t)*x2(t)
+Wh=2*min(Wb1,Wb2)
+disp("Wh=")
+disp(Wh)
+//x1(t)*cos(2*%pi*t)
+Wi=2*(Wb1+2*%pi)
+disp("Wi=")
+disp(Wi)
+//x1'(t)
+Wj=2*Wb1
+disp("Wj=")
+disp(Wj)