You are on page 1of 3

Sr N o

1 2 3 4 5

Loa Strain d long* P(Lb (10^s) 6) Avera ge 200 87 400 166 600 244 800 319 100 400.5 0

wid th

thickn ess

Strain Lateral*( 10^-6)2

Colum Colum n1 n2

1.Str ain long* (10^6) 87 166 244 318 400

2.Str ain long* (10^6) 87 166 244 320 401

1. Strain lateral*( 10^-6)

2. Strain lateral*( 10^-6)

0.125

-27 -53 -80 -106.5 -132.5

-25 -51 -76 -102 -126

-28 -54 -84 -111 -139

(Table Saved in Documents Named as datamatlab(1))

%ME225 Curve Fitting Program% %Michael Foch %open excel document format long; Data=xlsread('datamatlab(1)'); %pull out variables Read_Num=Data(:,1); %the column with all the reading numbers Load=Data(:,2); %column two with all readings Long_strain=Data(:,9:10)*10^-6; %data in columns 9 and 10 long. strains width=Data(1,4); %width value thickness=Data(1,5); %thickness value inches Lat_Strain=Data(:,11:12)*10^-6; %data in columns 11 and 12 lat. strains %Calculations N=numel(Read_Num);%number of readings lon = mean(Long_strain,2);%mean of long. strain lat = mean(Lat_Strain,2); %mean of lateral strain latp = abs(lat); %absolute value of lateral strain area=width*thickness;%area of specimen inches squared stress=Load/area; %load in psi experimental %least squares curve fitting for stress vs strain A=[8.7e-5 1; 1.66e-4 1; 2.44e-4 1; 3.19e-4 1; 4.005e-4 1];%5x2 Matrix on long. strain first column and 1's in second column b=[800 1600 2400 3200 4000]'; %stress in 5x1 matrix

ym=A\b %left division of matrices ym1 = slope(young's mod.) ym2=y-intercept x=linspace(8.7e-5,4.005e-4,5); %pts on x axis y1= ym(1)*x + ym(2); %calculated y (stress values) %least squares curve fitting for lat.strain vs long. strain d=[2.65e-5 5.25e-5 8e-5 1.065e-4 1.3250e-4]'; %5x2 matrix of lat strain column 1 and 1's column 2 pr=A\d %left division to obtain pr1=(slope or Poisson's ration; pr2= y intercept x=linspace(8.7e-5,4.005e-4,5); %pts on x axis y2= pr(1)*x + pr(2); %calculated y values (lat. strain) %Young's Modulus young_cal=ym(1);%slope of calc. stress and long strain values (Young's modulus) young_exp=(stress(N)-stress(1))/(lon(N)-lon(1)); %Experimental Young's modulus %percent difference young_diff=100*((young_exp-young_cal)/young_cal); %determine absolute youngabs=abs(young_diff); %Poisson's Ratio pos_cal=pr(1);%slope of calculated lat vs. long strain (Poisson's ratio) pos_exp=(latp(N)-latp(1))/(lon(N)-lon(1));%experimental Poisson's Ratio %percent difference pos_diff= 100*((pos_exp-pos_cal)/pos_cal); %determine absolute posabs=abs(pos_diff); %RMSE %Young's Modulus d_n=stress' - y1; %Deviation of Exp. Pts from Line E = sum(d_n).^2; %Error of pts. for stress vs. strain Np=5; %Number of Data Points RMSE_Young = sqrt(E/Np) %Root Mean Squared Error for Stress vs. Strain %Poisson's Ratio d_n1= latp' - y2; %Deviation of exp. pts for lat vs. long strain E = sum(d_n1).^2; %Error of pts. for lat vs. long. strain Np=5; RMSE_Pos = sqrt(E/Np) %Root mean squared error for lat. vs long. strain

%plot the experimental and calculated data on the same plot subplot(2,1,1), plot(lon,stress,'r-'),hold on, plot(x,y1,'g'),xlabel('Long. Strain'),ylabel('Stress (psi)'),title('Stress vs. Long. Strain'),... legend('exp','calc'); hold on subplot(2,1,2), plot(lon,latp,'b-'),hold on, plot(x,y2,'m'),xlabel('Long. Strain'),ylabel('Lateral Strain'), title('Lateral vs. Longitudinal Strain')... ,legend('exp','calc');

Young's Modulus Experimental Calculated Percent Difference 10.21 Mpsi 10.26 Mpsi 0.47%

Poisson's Ratio 0.338 0.341 0.83%

You might also like