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 /2279/CH6/EX6.1 | |
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 '2279/CH6/EX6.1')
-rwxr-xr-x | 2279/CH6/EX6.1/eg_6_1.sce | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/2279/CH6/EX6.1/eg_6_1.sce b/2279/CH6/EX6.1/eg_6_1.sce new file mode 100755 index 000000000..fd38eb38b --- /dev/null +++ b/2279/CH6/EX6.1/eg_6_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]")
|