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 /2411/CH4/EX4.6/Ex4_6.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 '2411/CH4/EX4.6/Ex4_6.sce')
-rwxr-xr-x | 2411/CH4/EX4.6/Ex4_6.sce | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/2411/CH4/EX4.6/Ex4_6.sce b/2411/CH4/EX4.6/Ex4_6.sce new file mode 100755 index 000000000..85e01b656 --- /dev/null +++ b/2411/CH4/EX4.6/Ex4_6.sce @@ -0,0 +1,10 @@ +// Scilab Code Ex4.6: Page-237 (2008)
+clc; clear;
+c = 3e+008; // Speed of light in vacuum, m/s
+v = 0.8*c; // Speed of the first spaceship, m/s
+u_prime = 0.9*c; // Speed of the second spaceship, m/s
+u = (u_prime+v)/(1+u_prime*v/c^2); // Relative speed of the ships as measured by the observer on either one from Velocity addition rule, m/s
+printf("\nThe relative speed of the ships as measured by an observer in either one = %5.3f c = %4.2e m/s", u/c, u);
+
+// Result
+// The relative speed of the ships as measured by an observer in either one = 0.988 c = 2.97e+008 m/s
\ No newline at end of file |