Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Write a script to plot the displacement of a cantilevered beam under a uniformly

ID: 2088688 • Letter: W

Question

Write a script to plot the displacement of a cantilevered beam under a uniformly distributed load. The program should also display (at the command window, including units) the values of the maximum deflection and the angle between the horizontal and the surface of the beam at its tip. 3. 24EI i 6EI where w is the load per unit length, E is Young's modulus for the beam, l is the moment of inertia of the beam, and L is the length of the beam. Prompt the user to input the following: beam material (as a string), w, I, and L. Some example input values are 1 = 0.163 in, L-10 in, and w = 100 lbf/in. Use the following values for E, depending on the beam material specified by the user: Esed 30x10 psi, Eatuminun 10x10 psi, Esitanium 17x10 psi.

Explanation / Answer

L=input('eneter Length in "in": ');
I=input('eneter Inertia in "in^4": ');
w=input('eneter udl in "lbf/in": ');
material=input('enter 1/2/3 for steel/aluminium/titanium: ');
E=[30E6,10E6,17E6];
Em=E(material);

x=L; %for max deflection at tip
y=-w*x^2/(24*Em*I)*(6*L^2-4*L^2*x+x^2);
ang=w*L^3/(6*Em*I);

fprintf('deflection at tip in "in" : %d ',y);

fprintf('angle at tip in "deg": %d ',ang*180/pi());

%sample output

eneter Length in "in": 10
eneter Inertia in "in^4": .163
eneter udl in "lbf/in": 100
enter 1/2/3 for steel/aluminium/titanium: 3 %titanium is choosen
deflection at tip in "in" : 4.962108e-001
angle at tip in "deg": 3.446155e-001

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote