summaryrefslogtreecommitdiff
path: root/842/CH1/EX1.6/Example1_6.sce
diff options
context:
space:
mode:
authorpriyanka2015-06-24 15:03:17 +0530
committerpriyanka2015-06-24 15:03:17 +0530
commitb1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b (patch)
treeab291cffc65280e58ac82470ba63fbcca7805165 /842/CH1/EX1.6/Example1_6.sce
downloadScilab-TBC-Uploads-b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b.tar.gz
Scilab-TBC-Uploads-b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b.tar.bz2
Scilab-TBC-Uploads-b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b.zip
initial commit / add all books
Diffstat (limited to '842/CH1/EX1.6/Example1_6.sce')
-rwxr-xr-x842/CH1/EX1.6/Example1_6.sce33
1 files changed, 33 insertions, 0 deletions
diff --git a/842/CH1/EX1.6/Example1_6.sce b/842/CH1/EX1.6/Example1_6.sce
new file mode 100755
index 000000000..a539fee43
--- /dev/null
+++ b/842/CH1/EX1.6/Example1_6.sce
@@ -0,0 +1,33 @@
+//clear//
+//Example 1.6:Determine the fundamental period of composite
+// discrete time signal
+//x[n] = exp(j(2*%pi/3)n)+exp(j(3*%pi/4)n)
+clear;
+clc;
+close;
+Omega1 = 2*%pi/3; //Angular frequency signal 1
+Omega2 = 3*%pi/4; //Angular frequency signal 2
+N1 = (2*%pi)/Omega1; //Peirod of signal 1
+N2 = (2*%pi)/Omega2; //Period of signal 2
+//To find rational period of signal 1
+for m1 = 1:100
+ period = N1*m1;
+ if(modulo(period,1)==0)
+ period1 = period;
+ integer_value = m1
+ break;
+ end
+end
+//To find rational period of signal 2
+for m2 = 1:100
+ period = N2*m2;
+ if(modulo(period,1)==0)
+ period2 = period;
+ integer_value = m2
+ break;
+ end
+end
+disp(period1)
+disp(period2)
+//To determine the fundamental period N
+N = period1*period2