Write a matlab script to solve the seven simultaneous equations and print output
ID: 3560029 • Letter: W
Question
Write a matlab script to solve the seven simultaneous equations and print output with proper units. Assume static friction is negligible. We have the following constraints W= 50; L = 12ft; g=32.2; theta= 35*pi/180; U_k = 0.2 (coefficient of kinetic friction)
we have these equations and you dont need the rest of the question to solve.... i just really have no idea how to set it up!!!! :
N_a - f_b = (W/g)*a_cmx (1)
N_b +f_a - W = (W/g) * a_cmy (2)
-(N_a + f_b)(L/2)cos(theta) + (N_b - f_a)(L/2)(sin(theta)) = (1/12)*(W*L^2)/(g) *alpha (3)
U_k*N_a = f_a (4)
U_k*N_b = f_b (5)
a_cmx = (alpha)(L/2)cos(theta) (6)
a_cmy = (-)(alpha)(L/2)sin(theta) (7)
The seven unknowns are:
N_a, N_b, f_a, f_b, a_cmx,a_cmy, alpha
Explanation / Answer
w=50;
L=12;
g=32.2;
theta=35*pi/180;
u_k=0.2;
syms n_a n_b f_a f_b a_cmx a_cmy alpha
[n_a n_b f_a f_b a_cmx a_cmy alpha]=solve(n_a-f_b-w/g*a_cmx,n_b+f_a-w-w/g*a_cmy,-(n_a+f_b)*(L/2)*cos(theta)+(n_b-f_a)*(L/2)*sin(theta)-w*L^2/(g*12)*alpha, u_k*n_a-f_a,u_k*n_b-f_b,a_cmx-alpha*(L/2)*cos(theta),a_cmy+alpha*(L/2)*sin(theta));
n_a=double(n_a);
n_b=double(n_b);
f_a=double(f_a);
f_b=double(f_b);
a_cmx=double(a_cmx);
a_cmy=double(a_cmy);
alpha=double(alpha);
fprintf('%n_a= 0.2f unit of n_a n_b= %0.2f unit of n_b f_a= %0.2f unit of f_a f_b= %0.2f unit of f_b a_cmx=%0.2f unit of a_cmx a_cmy=%0.2f unit of a_cmy alpha=%0.2f unit of alpha ',n_a,n_b,f_a,f_b,a_cmx,a_cmy,alpha)
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.