summaryrefslogtreecommitdiff
path: root/2066/CH2/EX2.8
diff options
context:
space:
mode:
authorpriyanka2015-06-24 15:03:17 +0530
committerpriyanka2015-06-24 15:03:17 +0530
commitb1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b (patch)
treeab291cffc65280e58ac82470ba63fbcca7805165 /2066/CH2/EX2.8
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 '2066/CH2/EX2.8')
-rwxr-xr-x2066/CH2/EX2.8/2_8.sce22
1 files changed, 22 insertions, 0 deletions
diff --git a/2066/CH2/EX2.8/2_8.sce b/2066/CH2/EX2.8/2_8.sce
new file mode 100755
index 000000000..70e231f3c
--- /dev/null
+++ b/2066/CH2/EX2.8/2_8.sce
@@ -0,0 +1,22 @@
+clc
+clear
+//Initialization of variables
+gam=0.0765 //lb/ft^3
+l=40 //ft
+w=16 //ft
+d=8 //ft
+z=6 //ft
+BG=1 //ft
+//calculations
+I=1/12 *l*w^3
+V=l*w*z
+IVG=I/V - BG
+MB=I/V
+//results
+printf("I/V -BG = %.2f ft ",IVG)
+if IVG >0 then
+ printf("\n Barge is stable")
+else
+ printf("\n The barge is unstable")
+end
+printf("\n Location of metacenter = %.2f ft above the center of buoyancy ",MB)