From 7f60ea012dd2524dae921a2a35adbf7ef21f2bb6 Mon Sep 17 00:00:00 2001 From: prashantsinalkar Date: Tue, 10 Oct 2017 12:27:19 +0530 Subject: initial commit / add all books --- 2279/CH6/EX6.1/Ex6_1.sce | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 2279/CH6/EX6.1/Ex6_1.sce (limited to '2279/CH6/EX6.1') 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]") -- cgit