A resistance load is applied to the ankle with the leg positioned as shown below. The forces on the leg when the knee is in full extension can be represented with the following linear system of equations: R_x - F_PL cos(theta) = 0 R_y + F_PL sin(theta) - W_L - E_R = 0 0.06F_PL - 0.32W_L - 0.45W_R = 0 where theta is the angle between the muscle and the leg (20 degrees) W_L is the weight of the leg (57 N) W_R is the resistance load (N) R_x and R_y are the reaction loads at the knee joint (N) F_PL is the force in the patellar ligament (N) Write a MATLAB script or function (your choice) to accomplish the following tasks: a) Starting at an initial resistance load W_R of 50 N and increasing the resistance load W_R by 5 N, solve the matrix form of the linear system of equations for unknown loads, R_x, R_y, and F_PL to satisfy the linear system of equations. Repeat the load calculations until the force in the patellar ligament F_PL is above than 2000 N. b) After the desired force is achieved, output the final force in the patellar ligament F_PL, the final resistance load W_R, a message describing the order of the unknown quantities, and the unknown quantities to the screen using the appropriate output mechanism. Solution: The final force in the patellar ligament is: 2.0290e+03 The final resistance load is: 230 The unknowns (Rx, Ry, FPL) are: 1.0e+03* 1.9066 -0.4070 2.0290
a)
syms x y z W ;
eqn1 = x - z*cos(20) == 2;
eqn2 = y + z*sin(20) == 57 + 50;
eqn3 = 0.06*z == 0.32*57 + 0.45*50;
[A,b] = equationsToMatrix([eqn1, eqn2, eqn3],[x,y,z]);
sol = linsolve(A,b);
i= sol(3,1);
while i<= 2000;
W= 50+5;
A = [1 0 -0.9397; 0 1 0.3420 ;0 0 0.06 ];
b = [0; 57+W ;0.32*57+0.45*W];
sol = linsolve(A,b);
i = sol(3,1);
end
Fpl = sol(3,1);
Wr = W;
------------------------------------------------------
If any problems using equationsToMatrix command then
syms W;
W=50;
A1 = [1 0 -0.9397; 0 1 0.3420 ;0 0 0.06 ];
b1 = [0; 57+W ;0.32*57+0.45*W];
sol = linsolve(A1,b1);
i = sol(3,1);
while i<= 2000;
W= W+5;
A = [1 0 -0.9397; 0 1 0.3420 ;0 0 0.06 ];
b = [0; 57+W ;0.32*57+0.45*W];
sol = linsolve(A,b);
i = sol(3,1);
end
Fpl = sol(3,1);
Wr = W;
--------------------------------------------------------------------------------------------------------------------------------------------------------------------
b) fprintf (\'The final force in the patellar ligament is :\ %d\ \',Fpl ) ;
fprintf (\'The final resistance load is :\ %d\ \',Wr );
disp(\'The unknowns (Rx, Ry, FPL) are:\');
disp(sol);