In: Advanced Math
The data is in the nonlinear regime. The first column is plastic
strain values (e) and the second column is
corresponding true stress (s) values. In the nonlinear regime, the
relation between e and s is:
? = ???
Where K,n are material constants which need to be determined using
curve fitting.
a). Plot e vs s on a scatter plot
b). Find the constants n and K using curve fit. We
have not learned how to fit a power law in class but here
is a hint: if you take the log of the equation above, it becomes a
linear equation in log(e) and log(s).
Data
| 0.07913 | 400.1313 | 
| 0.079274 | 400.394 | 
| 0.079433 | 400.6575 | 
| 0.079582 | 400.914 | 
| 0.079731 | 401.1977 | 
| 0.079875 | 401.4677 | 
| 0.080019 | 401.7893 | 
| 0.080168 | 402.084 | 
| 0.080316 | 402.382 | 
| 0.08046 | 402.6442 | 
| 0.080609 | 402.8987 | 
| 0.080753 | 403.1742 | 
| 0.080907 | 403.4315 | 
| 0.081056 | 403.7102 | 
| 0.081205 | 403.9754 | 
| 0.081359 | 404.258 | 
| 0.081508 | 404.5485 | 
| 0.081652 | 404.8328 | 
| 0.081801 | 405.1216 | 
| 0.081945 | 405.4012 | 
| 0.082089 | 405.6714 | 
| 0.082243 | 405.9478 | 
| 0.082392 | 406.2127 | 
| 0.082546 | 406.4651 | 
| 0.082695 | 406.7232 | 
| 0.082834 | 406.9823 | 
| 0.082988 | 407.2513 | 
| 0.083132 | 407.5583 | 
| 0.08328 | 407.8404 | 
| 0.083429 | 408.1223 | 
| 0.083573 | 408.3959 | 
| 0.083717 | 408.6451 | 
| 0.083871 | 408.8914 | 
| 0.084026 | 409.1303 | 
| 0.084175 | 409.3806 | 
| 0.084319 | 409.6619 | 
| 0.084472 | 409.949 | 
| 0.084621 | 410.2324 | 
| 0.084765 | 410.4981 | 
| 0.084914 | 410.7732 | 
| 0.085068 | 411.0592 | 
| 0.085212 | 411.3118 | 
| 0.085357 | 411.515 | 
| 0.085511 | 411.7665 | 
| 0.085655 | 412.0262 | 
| 0.085803 | 412.3185 | 
| 0.085952 | 412.6021 | 
| 0.086101 | 412.8792 | 
| 0.08625 | 413.1566 | 
| 0.086399 | 413.4088 | 
USE MATLAB CODE ONLY!
USE MATLAB CODE ONLY!
THANK YOU


%%Matlab code for curve fitting
clear all
close all
%all data point
A=[0.07913    400.1313;...
0.079274    400.394;...
0.079433    400.6575;...
0.079582    400.914;...
0.079731    401.1977;...
0.079875    401.4677;...
0.080019    401.7893;...
0.080168    402.084;...
0.080316    402.382;...
0.08046    402.6442;...
0.080609    402.8987;...
0.080753    403.1742;...
0.080907    403.4315;...
0.081056    403.7102;...
0.081205    403.9754;...
0.081359    404.258;...
0.081508    404.5485;...
0.081652    404.8328;...
0.081801    405.1216;...
0.081945    405.4012;...
0.082089    405.6714;...
0.082243    405.9478;...
0.082392    406.2127;...
0.082546    406.4651;...
0.082695    406.7232;...
0.082834    406.9823;...
0.082988    407.2513;...
0.083132    407.5583;...
0.08328    407.8404;...
0.083429    408.1223;...
0.083573    408.3959;...
0.083717    408.6451;...
0.083871    408.8914;...
0.084026    409.1303;...
0.084175    409.3806;...
0.084319    409.6619;...
0.084472    409.949;...
0.084621    410.2324;...
0.084765    410.4981;...
0.084914    410.7732;...
0.085068    411.0592;...
0.085212    411.3118;...
0.085357    411.515;...
0.085511    411.7665;...
0.085655    412.0262;...
0.085803    412.3185;...
0.085952    412.6021;...
0.086101    412.8792;...
0.08625    413.1566;...
0.086399    413.4088];
%plotting the data
e=A(:,1); s=A(:,2);
scatter(log(e),log(s))
pp=polyfit(log(e),log(s),1);
yy=polyval(pp,log(e));
hold on
plot(log(e),yy)
title('log(s) vs. log(e) plot')
xlabel('log(e)')
ylabel('log(s)')
legend('scatter plot','linear fit')
fprintf('Value of log(k)= %f and n=%f\n', pp(2),pp(1))
fprintf('Hence K=%f\n',exp(pp(2)))
%%%%%%%%%%%%%%%%%%%%% End of Code %%%%%%%%%%%%%%%%%%%