3 Write a script to plot the displacement of cantilevered be

3. Write a script to plot the displacement of 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. y(x) 24EI WAL 6EI where w is load per unit length, E is Young\'s modulus for the beam, Iis the moment of inertia the of the beam, and L is the length of the beam. Prompt the user to input the following: beam and material (as a string), w, I, and L. Some example input values are I 10 the user: 100 lbfin. Use the following values for E, depending on the beam material specified by Esteel 30x106 psi, Ealuminum\' 10x106 psi, Eti 17x 106 psi

Solution

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

 3. Write a script to plot the displacement of cantilevered beam under a uniformly distributed load. The program should also display (at the command window, inc

Get Help Now

Submit a Take Down Notice

Tutor
Tutor: Dr Jack
Most rated tutor on our site