summaryrefslogtreecommitdiff
path: root/2219/CH11/EX11.12
diff options
context:
space:
mode:
authorpriyanka2015-06-24 15:03:17 +0530
committerpriyanka2015-06-24 15:03:17 +0530
commitb1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b (patch)
treeab291cffc65280e58ac82470ba63fbcca7805165 /2219/CH11/EX11.12
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 '2219/CH11/EX11.12')
-rwxr-xr-x2219/CH11/EX11.12/Ex11_12.sce19
1 files changed, 19 insertions, 0 deletions
diff --git a/2219/CH11/EX11.12/Ex11_12.sce b/2219/CH11/EX11.12/Ex11_12.sce
new file mode 100755
index 000000000..914843985
--- /dev/null
+++ b/2219/CH11/EX11.12/Ex11_12.sce
@@ -0,0 +1,19 @@
+// Chapter 11 example 12
+//------------------------------------------------------------------------------
+clc;
+clear;
+// Given data
+a = 25000*10^3; // semimajor axis in m from fig
+G = 6.67*10^-11; // Gravitational constant
+M = 5.98*10^24; // mass of the earth in kg
+h = 0
+
+// Calculations
+u = G*M;
+T = 2*%pi*sqrt((a^3)/u)
+hr = T/3600 // conv. from sec to hrs and min
+t = modulo(T,3600) // conv. from sec to hrs and min
+mi = t/60 // conv. from sec to hrs and min
+
+// Output
+mprintf('Orbital time period = %d Hours %d minutes',hr,mi)