summaryrefslogtreecommitdiff
path: root/623/CH1/EX1.1.7
diff options
context:
space:
mode:
authorpriyanka2015-06-24 15:03:17 +0530
committerpriyanka2015-06-24 15:03:17 +0530
commitb1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b (patch)
treeab291cffc65280e58ac82470ba63fbcca7805165 /623/CH1/EX1.1.7
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 '623/CH1/EX1.1.7')
-rwxr-xr-x623/CH1/EX1.1.7/U1_C1_7.sce14
1 files changed, 14 insertions, 0 deletions
diff --git a/623/CH1/EX1.1.7/U1_C1_7.sce b/623/CH1/EX1.1.7/U1_C1_7.sce
new file mode 100755
index 000000000..ee54c154c
--- /dev/null
+++ b/623/CH1/EX1.1.7/U1_C1_7.sce
@@ -0,0 +1,14 @@
+//variable initialization
+interval_s=0 //time difference between two events in frame s (second)
+separation_s=1; //spatial separation of two events in frame s (meter)
+separation_sdash=2; //spatial separation of two events in frame s' (meter)
+c=3*10^8; //speed of light (meter/second)
+v=rand(); //assign a random value to unknown velocity of frame s' with respect to frame s (meter/second)
+
+//calculation of time interval between the events in frame s'
+Gamma=separation_sdash/(separation_s-(v*interval_s)); //calculating value of Gamma
+Beta=(1-1/(Gamma^2))^(1/2); //calculating value of Beta
+v=Beta*c; //velocity of s' with respect to s (meter/second)
+interval_sdash=Gamma*(interval_s-((v*separation_s)/(c^2))); //time interval between the events in frame s' (second)
+
+printf("\nThe time interval between the events in frame s` = %.2e X0",interval_sdash);