You are on page 1of 1

% Josh Pham

%Inclass project week 4


%ME 232a
clear;clc
d = .505; %inches
A = (pi()*d^2)/4; %inches squared
load = [0 1650 3400 5200 6850 7750 8650 9300 10100 10400]';%lbf
lnot=2;
l = [2:.002:2.010 2.020 2.040 2.080 2.120]; %inches
%a. Use provided data to calculate the stress and corresponding strain
for
%each data pair. diameter = 0.505 in.
stress = load/A; %pounds per square inch
strain = (l-lnot)/lnot;
%b Create an xy plot with strain on the x and stress on the y.
%c. Add a title and appropriate axis labels. d.
%d. Add textbox to mark yield point.
plot(strain,stress,'-ok');title('Stress-strain diagram');
xlabel('strain \epsilon');ylabel('stress \sigma'); text(.01,4E4,'yield
point is at (.05,4x10^4)');

Published with MATLAB R2015b

You might also like