summaryrefslogtreecommitdiff
path: root/2411/CH4/EX4.7/Ex4_7.sce
diff options
context:
space:
mode:
Diffstat (limited to '2411/CH4/EX4.7/Ex4_7.sce')
-rwxr-xr-x2411/CH4/EX4.7/Ex4_7.sce10
1 files changed, 10 insertions, 0 deletions
diff --git a/2411/CH4/EX4.7/Ex4_7.sce b/2411/CH4/EX4.7/Ex4_7.sce
new file mode 100755
index 000000000..e6af0d2d2
--- /dev/null
+++ b/2411/CH4/EX4.7/Ex4_7.sce
@@ -0,0 +1,10 @@
+// Scilab Code Ex4.7: Page-237 (2008)
+clc; clear;
+c = 3e+008; // Speed of light in vacuum, m/s
+v = 0.9*c; // Speed of the first particle, m/s
+u_prime = 0.9*c; // Speed of the oppositely moving second particle, m/s
+u = (u_prime+v)/(1+u_prime*v/c^2); // Velocity of one particle relative to the other from Velocity addition rule, m/s
+printf("\nThe velocity of one particle relative to the other = %5.3f c = %4.2e m/s", u/c, u);
+
+// Result
+// The velocity of one particle relative to the other = 0.994 c = 2.98e+008 m/s \ No newline at end of file