A 200-lb weight W is bang hung from the end of a rigid 8-ft horizontal beam of n
ID: 2324907 • Letter: A
Question
A 200-lb weight W is bang hung from the end of a rigid 8-ft horizontal beam of negligible weight as shown. The beam is attached to a wall by a pivot and is supported by an 8-foot long cable that is also attached to the wail at a higher point. The tension in this cable is given by the equation T = W L_c L_b/d Squareroot L_c^2 - d^2 where T is the tension in the cable, W is the weight, L_c is the length of the cable, L_b is the length of the beam, and d is the distance along the beam at which the cable is attached. Write a MATLAB code to determine distance d where the cable should be attached to die beam such that the tension T in the cable is minimized. To do this, the program should ask the user to input the weight W. lengths L_c and L_b, then calculate the tension T at regular 0.01-ft intervals for 1' lessthanorequalto d lessthanorequalto 7'. The program should then locate the position d that produces the minimum tension and display the result using fprintf. Also the program should plot the tension T as a function of d with appropriate title and axis labels.Explanation / Answer
Matlab codes are as follows-
%the value of d is 5.66
W=input('enter the weight');
Lb=input('enter the length of the beam');
Lk=input('enter the length of the cable');
d=1:0.01:7;
T=W*Lk*Lb./(d.*((Lk^2-d.*d).^(1/2)));
k=1;
for i=2:601
if(T(k)>T(i))
k=i;
end
end
fprintf('the value of d is %f ',d(k));
plot(d,T);
xlabel('distance along the beam');
ylabel('Tension in the cable');
title('Tension v/s distance');
Related Questions
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.