blob: 97ede31158f15c0bc1b2c9983656b92c74e9d571 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
|
//Initilization of variables
m=30 //kg
k=0.45 //m
g=9.8 //m/s^2
//Using equations of motion
//Solving for T1,T2 and alpha
A=[1,0,-m;0,-1,-45;-0.6,0.3,-m*k^2]
B=[50*g;-150*g;0]
C=inv(A)*B
//Result
clc
printf('The values are T1=%f N T2=%f N and alpha=%f rad/s^2 ',C(1),C(2),C(3))
|