Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Step 2: Calculate

...

σx for

...

ri = 1 cm

Remember elementary statics? It gives the bending stress at point O as Image Added
Using my calculator, I get σx σx=-101.7 MPa. We'll check the MATLAB result against this value.

Calculate

...

σx at point O

In your program, leave a blank line and start a new section for calculating σx σx at point O with an explanatory comment line. Then, create the parameters M, ro, and ri since these are needed to calculate σxσx. Image Added
Following this is the statement to calculate I, the moment of inertia: Image Added
Things to note: the parameter pi is predefined and contains a very accurate value of π. The operator ^ is used to raise a quantity to a desired power. Now we can calculate σx σx at O:

Image Added

The factor 1010^-6 6^ above converts the result into MPa. The semi-colon at the end of the line is left off so that we can see what the resulting value of sigma_x is. Click on the Run icon in the editor (or hit the F5 key) . What is the value of sigma_x reported by your program? I get Image Added
This is close enough to my paper-and-pencil result of -101.7 MPa aboveMPaabove. See my entire program here (opens in a new window).

Go to Step toStep 3: Plot σx vsσxvs. ri