From b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b Mon Sep 17 00:00:00 2001 From: priyanka Date: Wed, 24 Jun 2015 15:03:17 +0530 Subject: initial commit / add all books --- 1895/CH7/EX7.4/EXAMPLE7_4.SCE | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100755 1895/CH7/EX7.4/EXAMPLE7_4.SCE (limited to '1895/CH7/EX7.4/EXAMPLE7_4.SCE') diff --git a/1895/CH7/EX7.4/EXAMPLE7_4.SCE b/1895/CH7/EX7.4/EXAMPLE7_4.SCE new file mode 100755 index 000000000..b814f8ee6 --- /dev/null +++ b/1895/CH7/EX7.4/EXAMPLE7_4.SCE @@ -0,0 +1,30 @@ +//ANALOG AND DIGITAL COMMUNICATION +//BY Dr.SANJAY SHARMA +//CHAPTER 7 +//SAMPLING THEORY AND PULSE MODULATION +clear all; +clc; +printf("EXAMPLE 7.4(PAGENO 327)"); + +//given +//x(t) = 6*cos(50*%pi*t) + 20*sin(300*%pi*t) - 10*cos(100*%pi*t) +//by comparing with standard eqn x(t) = A_1*cos(w_1*t) + A_2*sin(w_2*t) + A_3*cos(w_3*t) we get +w_1 = 50*%pi//frequency in rad/sec +w_2 =300*%pi//frequency in rad/sec +w_3 = 100*%pi//frequency in rad/sec + +//calculations +f_1 = w_1/(2*%pi)//frequency in hertz +f_2 = w_2/(2*%pi)//frequency in hertz +f_3 = w_3/(2*%pi)//frequency in hertz +if (f_1 > f_2 & f_1> f_3) then + f_max = f_1 +elseif (f_2 > f_1 & f_2> f_3) then + f_max = f_2 +else (f_3 > f_1 & f_3> f_2) then + f_max = f_3 + end +f_s = 2*f_max;//nyquist rate + +//results +printf("\n\nNyquist rate for a continuous signal = %.2f Hz",f_s); -- cgit