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 /1895/CH7/EX7.4/EXAMPLE7_4.SCE | |
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 '1895/CH7/EX7.4/EXAMPLE7_4.SCE')
-rwxr-xr-x | 1895/CH7/EX7.4/EXAMPLE7_4.SCE | 30 |
1 files changed, 30 insertions, 0 deletions
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);
|