blob: f6bfd339527f8aab2877d9d022bfeb9de6b5465a (
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
mc=7.25 //kg
d=0.9 //m
la=0.2 //m
ma=9 //kg
F=45 //N
ay=0 //m/s^2
g=9.8 //m/s^2
//Calculations
I=2*(0.5*mc*(d/2)^2)+0.5*ma*(la/2)^2 //kg-m^2
//Using the equations of motion
Na=(2*mc+ma)*g //N
//Simplfying using radial velocity formula
//Solving the two equations using matrix method
A=[-1,-(2*mc+ma);(d/2),-I/(d/2)]
B=[-F;F*(la/2)]
C=inv(A)*B
F=C(1) //N
ax=C(2) //m/s^2
//Result
clc
printf('The computation yields ax=%f m/s^2',ax)
|