# Shear and Bending Moment

## ES 301 Assignment 3

Work Problem 7.36 in Beer and Johnston *Statics*, sixth edition in the
usual way.
Then, using either Notepad in Windows 95 or Emacs in Unix, write a Matlab
program to find the shear and bending moment at the load points.
Also, plot the bending moment vs. the distance along the beam as
shown below. Run your program in Matlab.
Be sure to program your name, date, and subject with lines such as:

% print the results
fprintf('\n Beam with Concentrated Forces')
fprintf('\n Your name, ES 301, ')
disp(date)

Also, be sure to use 1x3 vectors for radius (r), force (f), shear (v)
and moment (m):
r = [ 0.6 (0.6+0.9) (0.6+0.9+1.5) ]
f = [ ...

Find the reaction force B with r cross f using the Matlab expression
sum( r .* f )

You can create the shear vector in a **for** loop with a vector
expression. Print the results in a table with **fprinf** in a **for** loop.
for i = 1:length(f)
fprintf(' %2.0f %6.0f %6.1f %6.1f \n',i,f(i),v(i),m(i))
end

Use the f format to control the number of displayed digits.
Print the results with a heading in a table
that starts like as:
Force Shear Moment
kN kN kN-M
A 50.5 0
1 40 10.5 30.3
2 ... ... ...
3 ... ... ...

Copy the output data from the screen and paste it into the bottom
of your source program.
Adjust the number between the % and . to align the decimal points.
Print your source program with the appended output.
Make a plot of moment vs. distance with title, grid, and x and y labels
using the **plot**, **title**, **xlabel**,
**ylabel**, and **grid** commands. Since there will be five
values of moment to plot, make two new vectors say m2 (1x5) and x2 (1x5)
putting your original three moment and distance values in locations 2:4.
Of course, the first and last moment values are zero.
For example, try out these commands.

m2 = zeros(1,5) % make a 1x5 vector of zeros for m
m2(2:4)=m(:) % moments

Print the plot.
Staple the
printouts of your source code and the plot to your solution obtained
by the conventional method and turn it in as usual.

Home, index |
ES Problems |
Pulley |
Parallel-Force |
Friction |
Matlab Help |
Search

Last revised: March 17, 2000