blob: 01ca0aaedfe7736ee20a8e540d66ded96fc31cf0 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
|
//Initilization of variables
W=644 //lb
F=30 //lb
theta=30 //degrees
r=1.5 //ft
g=32.2 //ft/s^2
//Calculations
//Using equations of motion
//Solving by matrix method
A=[1,-W/g;-r,-(1/2)*(W/g)*(2*2)*(1/r)]
B=[W*sind(theta)-F*cosd(theta);-F*2]
C=inv(A)*B
a=C(2) //ft/s^2
//Result
clc
printf('The value of a is %f ft/s^2',a)
|