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 --- 623/CH1/EX1.1.6/U1_C1_6.sce | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100755 623/CH1/EX1.1.6/U1_C1_6.sce (limited to '623/CH1/EX1.1.6/U1_C1_6.sce') diff --git a/623/CH1/EX1.1.6/U1_C1_6.sce b/623/CH1/EX1.1.6/U1_C1_6.sce new file mode 100755 index 000000000..fbecb4ed6 --- /dev/null +++ b/623/CH1/EX1.1.6/U1_C1_6.sce @@ -0,0 +1,13 @@ +//variable initialization +interval_s=1 //time difference between two events in frame s (second) +interval_sdash=4 //time difference between two events in frame s' (second) +separation_s=0 //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(meter/second) + +//calculation of spatial separation of the events in frame s': +Gamma=interval_sdash/(interval_s-(v*(separation_s))/(c^2)); //calculating gamma + +separation=-2*(((Gamma^2)-1)^(1/2))*c; //spatial separation in s' (meter) + +printf("\nspatial separation of the events in frame s` = %.2e meter",separation); -- cgit