Question: An Engineer has requested you write a program to calculate the deflection at center, deflection at load and the maximum deflection of a level beam
An Engineer has requested you write a program to calculate the deflection at center, deflection at load and the maximum deflection of a level beam with a load at a specified number of equidistant points along the beam that is supported by a point at each end.
The following formulas are applied where a>=b, for those points where a b with a. Where P is the load in pounds, L is length of the beam in inches, E is the modulus of elasticity (psi), I is the moment of inertia (in4). The a symbol in inches along the beam from the left side for the equidistant point for which you are calculating the deflections. The b symbol is b = L-a.
MaxDeflection= -PbL2- b2 3/293 EIL
Deflection_at_Load = -Pa2b23EIL
Deflection at Center= -Pb(3L2-4b2)48EI
Ask the user for the following inputs (must be non-negative).:
Length of the beam in inches.
Load in pounds.
Modulus of elasticity in psi.
The number of points to have deflection computed for, including the two ends (must be >=2 and an integer). This vector is a.
You program must then call the function deflection to compute the deflection at center, deflection at load and the maximum deflection deflections for each of equidistant points (A vector).
You must the generate a report with 4 labeled columns, Position, Maximum Deflection, Deflection at load, and Deflection at center as shown in the sample run
Finish the following MATLAB function and write a MATLAB Script that (uses that function) to satisfy the above description.
function [ max_Def, def_at_Load, def_at_Center ] = deflection( A, P, I, L, E )
%{
This function gets the following arguments IN
A is a vector of the equidistance points for the deflection to be calculated along the beam.
P is a scalar representing the load in pounds
I is a scalar representing the moment of inertia
L is a scalar representing the length in inches
E is a scalar representing the modulus of elasticity
The function returns the following arguments OUT
max_Def is a vector of the maximum deflections of the beam
def_at_Load is a vector of deflection of the beam at the point of the load
def_at_Center is a vector of deflection of the beam at its center
%}
Outline:
Create a MATLAB Function .m file named deflection.m
Copy the skeleton function given
Finish the function by assigning all of the output variables correctly
Create a MATLAB Script .m file named Program05.m
Write the necessary MATLAB commands to prompt for and read into variables all the variables needed
Call your deflection.m function to compute the deflections
Format and display to the screen, the output report for the position, max_deflection, deflection_at Load and deflection_at_Center as shown in the sample run
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
