diff options
author | prashantsinalkar | 2017-10-10 12:27:19 +0530 |
---|---|---|
committer | prashantsinalkar | 2017-10-10 12:27:19 +0530 |
commit | 7f60ea012dd2524dae921a2a35adbf7ef21f2bb6 (patch) | |
tree | dbb9e3ddb5fc829e7c5c7e6be99b2c4ba356132c /2279/CH6/EX6.1 | |
parent | b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b (diff) | |
download | Scilab-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/EX6.1')
-rw-r--r-- | 2279/CH6/EX6.1/Ex6_1.sce | 27 |
1 files changed, 27 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]")
|