summaryrefslogtreecommitdiff
path: root/3204/CH14/EX14.25/Ex14_25.sce
blob: a3404c0bd445bfc6dd333f94c160e3a598ca6737 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
// Initilization of variables
P=30 // N // weight on pulley A
Q=20 // N // weight on pulley B
R=10 // N // weight on puey B
g=9.81 // m/s^2 // acc due to gravity
// Calculations
// Solving eqn's 6 & 7 using matrix for a & a_1, we get
A=[70 -40;-10 30]
B=[10;-10]
C=inv(A)*B
// Acceleration of P is given as,
P=C(1) // m/s^2
// Acceleration of Q is given as,
Q=C(2)-C(1) // m/s^2
// Acceleration of R is given as,
R=-(C(2)+C(1)) // m/s^2 // as R is taken to be +ve
// Results
clc
printf('The acceleration of P is %f g \n',P)
printf('The acceleration of Q is %f g \n',Q)
printf('The acceleration of R is %f g \n',R)
// Here the -ve sign indicates deceleration or backward/downward acceleation.