summaryrefslogtreecommitdiff
path: root/3137/CH16/EX16.25/Ex16_25.sce
blob: 52f45b43f4a4a8c25537590cc2c260f5ab191c98 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
//Initilization of variables
W=50 //lb
P=10 //lb
t=5 //s
vo=0 //ft/s
g=32.2 //ft/s^2
//Calculations
//Using equations of motion
ax=(P*g)/W //ft/s^2
//Solving by matrix method for A and B
F=[1,1;-4,4]
Q=[W;P]
R=inv(F)*Q
//Velocity calculations
v=vo+ax*t //ft/s
A=R(1) //lb
B=R(2) //lb
//Result
clc
printf('The velocity of the door after 5s is %f ft/s and A=%f lb and B=%f lb',v,A,B)