summaryrefslogtreecommitdiff
path: root/1457/CH2/EX2.6/2_6.sce
blob: e115cc0169d9543caaadaabfd115e8e214b9ffcf (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
clc
//Initialization of variables
d1=4 //in
h1=3.75 //in
w1=0.85 //lb
gamma=52 //lb/ft^3
d2=5 //in
depth=3 //in
//Calculations
A=[(d1/2)*(d1/2), -(d2/2)*(d2/2)+(d1/2)*(d1/2) ; 1,1]
b=[0;w1*12*(12*2/d1)^2 /(gamma*%pi)]
C=A\b
x=C(1,1)
y=C(2,1)
height=depth-x
//Results
printf('Bottom of the cylinder will be %.2f in above the bottom of hollow cylinder',height)