mat lab
A 7-mm cube of bone was subjected to a compression loading test in which it was compressed in increments of approximately 0.05 mm (see Figure 1). The force required to produce each amount of deformation was measured, and a table of values was generated (Table 1). Write a MATLAB script to display a table of stress and strain values for this test. Use the max function to find the ultimate compressive strength of the bone. Ultimate compressive strength is the maximum stress. See equations and definitions below. You may copy/paste data from Table 1 to the Variable Editor in MATLAB to create variable arrays for deformation and force. To display a row array x as a column use disp(x) or fprintf(%fn,x). To display two row arrays as two columns use disp(x,x) or fprintf(‘%f t %fn’,x;x).
Table 1. Deformation and Force Data
Deformation (mm)Force (N)
0.000.0
0.1067.9
0.15267.6
0.20640.2
0.26990.2
0.311256.1
0.361259.9
0.411190.9
0.461080.8
0.51968.6
0.56814.2
Stress, (N/m2 or Pascals), is calculated as force divided by the original cross sectional area of the material tested. The ultimate compressive strength is the maximum stress. Strain, (%), is calculated as change in length divided by the original length.
(N/m2) = force / cross-sectional area
(%) = (deformed length original length) / original length 100%
Notes:
1.deformation = deformed length original length
2.compression is applied to opposite faces of the cube; cross-sectional area is assumed to the be the cutting plane orthogonal to direction of compression
(a)(b)
Figure 1. (a) Cube of material loaded in compression platens of a (b) universal testing machine. http://www.instron.com/en-us/testing-solutions/by-test-type/compression/astm-c109
In order to receive full credit for each problem you must:
1.Begin your program (.m file) with a comments section including the following:
a.The assignment number (Homework 2), the name of the program, and a brief description of the purpose of the program.
b.The date created and the creators name in the second line.
c.The definitions of the variable names for every input and output variable. Include definitions of variables used in the calculations and units of measurement for all input and all output variables.
2.Include comments throughout your program to explain your calculations.
3.Use the disp or fprintf command to display stress and strain in a table format with column headings (including units).
4.Use the disp or fprintf command to display ultimate compressive strength (including units).
5.Publish your MATLAB program (.m file) to html. To publish your script from the desktop:
a.Open the MATLAB program (.m file) that you want to publish in the Editor.
b.From the main menu, choose File Publish filename.m.
6.Upload your html (filename.html) file to eCourseware (elearn.memphis.edu) under the Dropbox. Your html file will be stored in a folder called HTML under your current working directory in MATLAB. Only html files will be accepted as submissions. All .m files will be ignored.
TAKE ADVANTAGE OF OUR PROMOTIONAL DISCOUNT DISPLAYED ON THE WEBSITE AND GET A DISCOUNT FOR YOUR PAPER NOW!




