summaryrefslogtreecommitdiff
path: root/24/CH10/EX10.3/Example10_3.sce
blob: 1700b750918d345cb36d836dbddef8d0efe00fd6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
//Given that
m1 = 0.70  //in kg
m = [0.14, 3.2]  //in kg
k = [4.1* 10^4, 2.6* 10^6]  //in N/m
d = [16* 10^-3, 1.1* 10^-3]  //in meter

//Sample Problem 10-3a
printf("**Sample Problem 10-3a**\n")
name = ['board', 'block']
U = zeros(2,1)
for count = 1:2
    U(count) = 0.5* k(count)* d(count)^2
    printf("The energy stored in %s is %fJ\n", name(count), U(count))
end

//Sample Problem 10-3b
printf("\n**Sample Problem 10-3b**\n")
for count = 1:2
    //Energy conservation
    Vf = sqrt(U(count)/(0.5*(m1+m(count))))
    //Momentum conservation
    Vi = (m1 + m(count))*Vf/m1
    printf("The minimum velocity required to break the %s is %fm/s\n", name(count), Vi)
end